Tagged: , ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1142664

    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?

    #1143414

    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

    #1143611

    Hi,

    I updated the other site to 4.6.1 and there it is still working.
    Maybe something else?

    #1143793

    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

    #1147856

    Hi Nikko,

    In the private content I pasted the credentials.

    #1148270

    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

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.