-
Wanted to ask this quite some time ago, when I was porting theme from another CMS. In HTMLy structure of posts in specific categories, and archive URLs is pretty simple:
But the With current functionality the only way of getting any content for those sites is to create static pages with category and archive slugs, and target them using static--category.html.php files? Should I base on What I would like to achieve is /category page that lists all defined categories as links to articles in that category with their meta descriptions. For /archive I thought about listing all links to older pages split by years. Similar to the way calendar agendas are listed. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Unfortunately that URL is already in use for a category so the easiest solution now is to redirect it to example 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 |
Beta Was this translation helpful? Give feedback.
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 theme404
template.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
orstatic--archives.html.php