Hot answers tagged

1

REWORKED ANSWER TO ANSWER THE QUESTION In order to exclude all pages with a certain template, all you need to do is to run a meta_query to exclude all pages with the custom field _wp_page_template set to bedankt. Remember, WordPress saves the template assigned to a page as a hidden custom field called _wp_page_template With this in mind, we can do the ...


1

As discussed in the comments, your database prefix settings are off-kilter. Check the database prefix actually in use in your database, and make sure it's the same as the one in wp-config.php. Also make sure all of your WordPress-related tables have the same prefix. You'll also need to search through your database, particularly in the _options table, as ...


1

You could try unsetting the original search query, otherwise you may be doubling up and the combination results in nothing? eg, try adding to your function: $query->set('s',''); UPDATE I am not sure on this one, but you could try the AND operator -I think this adds to the existing query instead of replacing it... function mytheme_pre_get_posts( $...



Only top voted, non community-wiki answers of a minimum length are eligible