Modifying Main Query Single Page Request
-
Hi al,,
I’ve a question regarding implementing the following functionality. If a specific page is requested, i want to switch the content based on some option set in the admin screen.
My main idea was to use pre_get_posts to change this behaviour. However,the documentatation explicitly lists: ‘pre_get_posts should not be used to alter the query for single Page requests’. Now, my main question is: which hook should I use to override the WP_Query object pointing to the new page?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Modifying Main Query Single Page Request’ is closed to new replies.