Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8925465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:42:10+00:00 2026-06-15T07:42:10+00:00

I’m having trouble calling functions using add_action. here is my process: I add the

  • 0

I’m having trouble calling functions using “add_action”. here is my process:

I add the “muimedia_post_video” like so in my functions.php (the last add_action):

/* Posts */
// muimedia_before_post_loop
add_action( 'muimedia_post_before_entry_content', 'muimedia_post_entry_meta', 10);
add_action( 'muimedia_post_entry_summary', 'muimedia_post_entry_summary', 10);
add_action( 'muimedia_post_after_entry_content', 'muimedia_post_entry_data', 10);
add_action( 'muimedia_post_no_results_not_found', 'muimedia_post_no_results_not_
found',   10);
add_action( 'muimedia_after_post_loop', 'muimedia_post_pagination', 10);
add_action( 'muimedia_post_video', 10);

I make the actual muimedia_post_video action function (in contentextensions.php):

/* muimedia_post_video */
if ( !function_exists( 'muimedia_post_video' ) ) {
    function muimedia_post_video() {
        ?>
        <div class="video-entry-summary">
            <?php if (has_post_thumbnail()){ ?>
            <a href="<?php the_permalink() ?>" 
title="<?php the_title_attribute( array('before' => esc_attr__( 'Permalink: 
', 'muimedia' ), 'after' => '')); ?>" rel="bookmark"><?php the_post_thumbnail();
?></a>
            <?php } ?>

            <h1 class="entry-title"><a href="<?php the_permalink(); ?>" 
            title="<?php the_title_attribute( array('before' => esc_attr__
            ( 'Permalink: ', 'muimedia' ), 'after' => '')); ?>" rel="bookmark">
            <?php the_title(); ?></a></h2>

<div class="entry-meta">
<span class="meta-date"><?php echo get_the_date(); ?></span>
</div>

        <?php the_excerpt(); ?>...

        <div id="disquscomments"><a href="<?php comments_link(); ?  >#disqus_thread">
        Comments</a></div>

    </div>
    <?php 
   }
}

Then I call the function in any php file like like so:

<?php do_action('muimedia_post_video'); ?>

I don’t know why, but this doesn’t show any posts. 🙁 If I use an action that came with the theme like “do_action(‘post_entry_summary’)” it shows all the posts for the respective category fine… but by theory it should work with my custom do_action as well because all I did was copy and pasted the post_entry_summary code, changed the name of it and added a new do_action in my themes functions.

It’s really important that I get this working and I have no idea why my own custom functions aren’t working. I’ve done everything correctly to my knowing. Any help would be appreciated so so so so so, so so…. so (so) much! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:42:14+00:00Added an answer on June 15, 2026 at 7:42 am

    Changing:

    add_action( 'muimedia_post_video', 10);
    

    to:

    add_action( 'muimedia_post_video', 'muimedia_post_video', 10);
    

    did the trick. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We're building an app, our first using Rails 3, and we're having to build
I would like to count the length of a string with PHP. The string
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have thousands of HTML files to process using Groovy/Java and I need to
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.