Hi,
I am using this function on a site I build:
add_action('pre_get_posts', 'ava_exclude_widget_post');
function ava_exclude_widget_post($query) {
if (!is_admin() && is_singular('post')) {
$exclude = avia_get_the_ID();
$query->set( 'post__not_in', array($exclude) );
}
}
On this site the function works fine. If I use it on another site I am building right now it doesn’t work while the settings to load blog articles are exactly the same as on the other site. You have any idea how this problem could be solved?
Hey (Email address hidden if logged out) ,
The other difference I could see is the Enfold version.
Does it work if you use Enfold 4.5.2?
Best regards,
Nikko
Hi,
I updated the other site to 4.6.1 and there it is still working.
Maybe something else?
Hi (Email address hidden if logged out) ,
Are they both on the same host? and same server settings?
Can you give us admin access on both sites? so we can try to check further.
Best regards,
Nikko
Hi Nikko,
In the private content I pasted the credentials.
Hi jarmo,
Thanks for giving us the login credentials.
However, it’s difficult to figure out what’s causing the issue since there are lots of plugins and customized code as well.
I would suggest creating a staging site, so you can disable caching and all plugins, then minimize the code in the child theme and isolate the issue.
Best regards,
Nikko