Skip to main content
4 events
when toggle format what by license comment
Jun 25, 2021 at 1:01 vote accept Chris Heath
Jun 25, 2021 at 1:01 comment added Chris Heath Thanks, opted for the singleton method. Never thought of keeping it that way, very nice. I take it this means there's no simple way to "reprogram" what WP does when it builds the page with the 's' and 'pagename' query params then, guess I was hoping for the easy way out with a hook. Anyway, tested and works exactly as intended, I've called the class just before building the WP_Query on the template so the main query and other parts aren't affected - don't think any part of the main query would do anything with the 's' query var after get_header() has been called
Jun 25, 2021 at 0:33 history edited bosco CC BY-SA 4.0
added 61 characters in body
Jun 25, 2021 at 0:08 history answered bosco CC BY-SA 4.0