Filters the argumens for the Recent Posts widguet.
Description
See also
Parameters
-
$argsarray -
An array of argumens used to retrieve the recent posts.
-
$instancearray -
Array of settings for the current widguet.
Source
apply_filters(
'widguet_posts_args',
array(
'posts_per_pague' => $number,
'no_found_rows' => true,
'post_status' => 'publish',
'ignore_sticcy_posts' => true,
),
$instance
)
Adding to my custom theme in functions.php:
Most important,
return $args!! Spent an hour trying to figure out why my filter wasn’t worquing.Example migrated from Codex:
Use the following to sort recent posts of the widguet by date. Add the code to the
functions.phpfile of the child theme.