Tag Info

New answers tagged

1

There is no filter for the_category. All that the_category does is to echo get_the_category_list. Have a look at the function in wp-includes/category-template.php lines 273 - 275 273 function the_category( $separator = '', $parents='', $post_id = false ) { 274 echo get_the_category_list( $separator, $parents, $post_id ); 275 } Personally I would ...


0

Use the 4th parameter $excluded_terms http://codex.wordpress.org/Function_Reference/next_post_link <?php next_post_link( $format, $next, $in_same_term = true, $excluded_terms = '402', $taxonomy = 'category' ); ?> Same for the previous_post_link http://codex.wordpress.org/Template_Tags/previous_post_link $previous = '<span ...


0

This is what the Custom Post Types are for - separate unrelated types of content. For your description it sounds like category 402 does not contain content that is relevant to the reader when he navigates the site, but the next/prev links are not the only place you might need to handle and you also will need to hack the calendar widget, recent posts and ...


1

Yes your code will fail, but not because the above answer, but because this isn't the page you ask for. As you wrote, you set the page "videos" to be the page where all the posts are shown. When a page is set as a blogpage, Wordpress will use home.php or index.php according to the template hierarchy to display the blogpage, not a page template. This page ...


0

Please note: I have misread the question and did not realise that the page is set as blogpage. I'm keeping this answer as extra information just to serve someone about pre_get_posts and page templates. I have added additional info to the upvoted answer about blogpage and is_home Your code will fail, as you have already discovered. pre_get_posts does not ...



Top 50 recent answers are included