If safe mode is not working, then that means that it has either not been turned on correctly, or the error is not coming from a snippet. What do you mean by ‘activated the query through another plugin’?
I created a query for elementor like this:
// Posts or Portfolio Widget
add_action( 'elementor/query/my_custom_filter', function( $query ) {
// Modify the posts query here
global $wp_query;
$args = array(
'category__and' => 'category', //must use category id for this field
'tag__in' => 'post_tag', //must use tag id for this field
'posts_per_page' => -1); //get all posts
$posts = get_posts($args);
foreach ($posts as $post) :
//do stuff
endforeach;
} );
amd then used this: my_custom_filter
in elementor archives template for the site.
-
This reply was modified 2 years, 5 months ago by chaimsem2.
I’m not sure how Elementor custom queries work, but I doubt it defines a function/constant for you to use like that. It sounds like reason why safe mode is not working is because you added my_custom_filter
to the archives template, so you’ll need to fix the template to fix your site.
gotcha, I think you’re right, I made a mistake here…Don’t think it’s to do with safe mode.
thanks for the help!