Remove aside posts from menu
-
Hi,
I have successfully stopped ‘aside’ posts being shown in my blogs menu (using default left side-bar setup) by adding a small piece of code in wp-includes/default-widgets.php.
However, this means altering a core script so I am wondering if anyone can tell me how to achieve this by using a filter?
I am using the twentyfourteen theme and have a child theme setup.
The code I have altered is in ‘class WP_Widget_Recent_Posts extends WP_Widget’ in ‘public function __construct()’
while ( $r->have_posts() ) : $r->the_post(); if(get_post_format( $r->ID ) == 'aside'){ continue; } // build menu items // other WordPress code } // End while loop
Thanks for your help.
My blog is at yew2.com/wordpress. It is not yet live.
- The topic ‘Remove aside posts from menu’ is closed to new replies.