I store the categories that a post belongs to in a database and I’d like to use them in the URL. How can I do this dynamically?
For example, I’d like to generate a URL like example.com/action-adventure/post-name.
I’d imagine it would involve routes.php, but I just don’t know how to do it dynamically.
This could be problematic, consider:
–
Blog/post would have priority here, so naming conventions become an issue/or not
Structure your links before hand I would suggest