Replies: 2 comments
-
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.
-
I made proper changes for my own web corner, but thought I share the changes for wider audience. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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
domain/category
anddomain/archive
URLs lead to 404 page.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?
Any way of hiding them from automatically generated menu without using for example tag "hidden", and checking for this tag in loop responsible for displaying menu items?
Creating menu manually is a solution, but I feel that achieving kind of a simple thing requires to many steps.
Not to mention that those two pages after saving cannot be deleted or edited in admin panel.
Should I base on
get('/category/:category'
code in htmly.php, and create a similar thing forget('/category'
and then use custom layout page?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.
Didn't give much thought yet to the final design of this page. Rather, I was thinking generally about making the page contain any content instead of leading to a 404.
Beta Was this translation helpful? Give feedback.
All reactions