ThemeShaper Forums » Thematic

if (is_single()) not working to remove nav_below.

(3 posts)
  • Started 2 years ago by shelzmike
  • Latest reply from bconradt
  • This topic is not resolved
  1. shelzmike
    Member

    Okay, I am so frustrated with this and not sure why it is not working. I want to remove the previous and next post navigation on pages that are single posts only.

    this code removes it for all pages:

    function remove_under_post_nav() {
    
    	remove_action('thematic_navigation_below','thematic_nav_below', 2);
    }
    add_action('init', 'remove_under_post_nav');

    but for some reason this does not work (it still shows up on single post pages:

    `function remove_under_post_nav() {
    if (is_single()) {
    remove_action('thematic_navigation_below','thematic_nav_below', 2);
    }
    }
    add_action('init', 'remove_under_post_nav');

    why is this not working? Thanks.

    Mike

    Posted 2 years ago #
  2. Hi Mike,

    try the action hook 'wp' instead of 'init'.

    Chris

    Posted 2 years ago #
  3. This did the trick for me Chris, thanks a heap!

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.