Link to home
Start Free TrialLog in
Avatar of andieje
andieje

asked on

How would i add pages of post_type new to display in the Wordpress Recent Posts widget

Hi

I am looking at the default widget for WP_Widget_Recent_Posts and i see this query
$r = new WP_Query( apply_filters( 'widget_posts_args', array( 'posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true ) ) );

Open in new window


Is there any way i can modify this to include custom pages of post_type news as these have a featured images just like posts.

I could just write the query myself but I dont understand how the filters are being applied

Thanks a lot for any help you can give
ASKER CERTIFIED SOLUTION
Avatar of eemit
eemit
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of andieje
andieje

ASKER

Many thanks