Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

Arevico on "Modifying Main Query Single Page Request"

$
0
0

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 all articles
Browse latest Browse all 8245

Trending Articles