Filter WordPress Recent Posts Widget
function wpc_filter_recent_posts_widget_parameters($params) { | |
$params['orderby'] = 'date'; | |
$params['tax_query'] = array( | |
array( | |
'taxonomy' => 'post_format', | |
'field' => 'slug', | |
'terms' => array('post-format-movie', 'post-format-aside'), | |
'operator' => 'NOT IN' | |
) | |
); | |
return $params; | |
} | |
add_filter('widget_posts_args', 'wpc_filter_recent_posts_widget_parameters'); |
This comment has been minimized.
This comment has been minimized.
Thanks! The |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
Thanks.