-
When the
Inherit Query from Template
option is enabled, you should be modifying the main query of the blog, instead of modifying the query loop block’s output.In your case, you do NOT need to enable the
Inherit Query from Template
option.Just need to set the
posts per page
to9
for the query loop, and it should work.Let me know 🙂
-
Anonymous
Can you provide me a code to modify the main query of the blog?
I want “Inherit Query from Template” option enabled.
When it is disabled, you get urls like this.
domain.com/?query-847a2065-page=2But when you use inherit query the url looks better:
/page/2/
I want this feature.
I added a link in Private Information. -
Alvind
Hi there,
This is a kind of hacky way to do it, but it works.
Add this PHP snippet:
add_action('init', function() { if (isset($_GET['query-847a2065-page']) && $_GET['query-847a2065-page'] == '2') { wp_redirect(home_url('/page/2/')); exit(); } });
- You must be logged in to reply to this topic.