Skip to content

custom layout for /category and /archive pages #864

Answered by danpros
Joduai asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately that URL is already in use for a category so the easiest solution now is to redirect it to example categories (static page). You can put this redirect inside your theme 404 template.

if (rtrim($_SERVER['REQUEST_URI'], '/') == site_path() . '/category') {
    $redir = site_url() . 'categories';
    header("location: $redir");	
}

I think that's the easiest way to achieve your goal without having to change the htmly core code.

Edit: later you can create static--categories.html.php or static--archives.html.php

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Joduai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants