WordPress.org

Ready to get started?Download WordPress

Forums

add_action ('get_sidebar', 'myfunction') not working (4 posts)

  1. jexley
    Member
    Posted 4 years ago #

    Hey there,
    I've written a plugin that starts with:
    add_action('get_sidebar', 'myfunction');
    and it doesn't work unless I change it to:
    add_action('get_footer', 'myfunction');

    even though the template code is:
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    In fact, I can get the plugin to display for just about any other action (or even add_filter) with the exception of "get_sidebar".

    Pity, because that's EXACTLY where I need it.

    Any ideas will make me happy like chocolate cake.

    Cheers!

  2. Rhand
    Member
    Posted 4 years ago #

    Maybe you can post the function itself so people can have a clearer picture...

  3. jexley
    Member
    Posted 4 years ago #

    Sadly, it doesn't matter what the function is, as even if I make it one line of "echo 'ok';" it still doesn't work.

    Anybody else have an issue with this ever?

    Thanks.

  4. bortkopplad
    Member
    Posted 4 years ago #

    Doesn't work for me either...

Topic Closed

This topic has been closed to new replies.

About this Topic