New answers tagged

0

Where is the fold now? to me, the fold is a little outdated, as it fully depends on the device/monitor size. It may be that JavaScript in the header of your site is blocking the page load. The best way to combat this is to simply load the JavaScript in the footer of the site instead.


0

While the pre_get_posts filter is going to let you modify the main query before it happens, letting you add extra requirements, in this case it isn't necessary! You can do it all with the URL and the search form First, the query variables passed into WP_Query can be used in the URL. post_parent being the query var you're wanting. So if we have this: <...


2

You can use pre_get_posts filter to filter out what you need. There's an example on how to do this in Codex: https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts#Exclude_Pages_from_Search_Results function search_filter($query) { if ( !is_admin() && $query->is_main_query() ) { if ($query->is_search) { $query->...



Top 50 recent answers are included