How to get blog slug name?
Posted: Wed Sep 13, 2023 2:20 am
Hello,
I'm developing a theme, and I want to automatically add blog menu/link (if home is a static page) to the navigation bar.
So far what I got is $site->uriFilters('blog') will get the blog URL.
But I still can't find the way to get the slug name.
For example, the slug being inputted is /stories/ or /articles/ or anything else.
How to get this slug name?
Thank you.
I'm developing a theme, and I want to automatically add blog menu/link (if home is a static page) to the navigation bar.
So far what I got is $site->uriFilters('blog') will get the blog URL.
But I still can't find the way to get the slug name.
For example, the slug being inputted is /stories/ or /articles/ or anything else.
How to get this slug name?
Thank you.