Roots Discourse

"Hard redirect" / Render different page


#1

Is it possible to render a page different to the one it would be normally rendered under special conditions, e.g. rendering a taxonomy archive page instead the front page after checking for a condition in a plugin? In some frameworks (e.g. Zend Framework) this also called a “hard” redirect which means that the redirect happens on server side without HTTP redirection of client, and indeed this is what I want. In case that WordPress doesn’t offer a simple method or routing system, can the custom sage based theme allow for this instead? Not only the template file would have to be different but also the queries for fetching the right posts.


#2

Worth reading: https://roots.io/routing-wp-requests/

We try to avoid general WP questions over here and recommend https://wordpress.stackexchange.com/