Hi @jward222002
Update this plugin to the latest version i.e. 1.0.3 and add this code to the end of your active theme’s functions.php file:
function spt_post_ticker_todays_post( $args ) {
$today = getdate();
$args['date_query'] = array(
array(
'year' => $today['year'],
'month' => $today['mon'],
'day' => $today['mday'],
),
);
return $args;
}
add_filter( 'spt_ticker_custom_query', 'spt_post_ticker_todays_post', 10, 1 );
Thanks!
Thanks for the quick response, when I added that to my file I got the following error.
Fatal error: Cannot redeclare spt_post_ticker_todays_post() (previously declared in /usr/share/wordpress/wp-content/plugins/simple-posts-ticker/public/render.php:190) in /usr/share/wordpress/wp-content/themes/glades/functions.php on line 194
Hi @jward222002
Use this:
function spt_post_ticker_filter_todays_post( $args ) {
$today = getdate();
$args['date_query'] = array(
array(
'year' => $today['year'],
'month' => $today['mon'],
'day' => $today['mday'],
),
);
return $args;
}
add_filter( 'spt_ticker_custom_query', 'spt_post_ticker_filter_todays_post', 10, 1 );
Thanks!
That got rid of the error message, but now the ticker area is only showing the top border of my widget (text widget that has the short code in it). Unfortunately this is a self hosted internal site so I can’t give you a link to it, but I can send screen shots if you have an email of Facebook messenger that I can use.