Using WordPress As A CMS
-
How do I find out which page has been set to blog, when wordpress is in CMS mode?
The background: I am building a theme for someone that wants to use wordpress as a cms. Currently home is set to ‘Home’, and the blog to ‘News & Events’.
As far as I know, wp_list_pages() only lists pages, which is a problem when the site is configured as it is above if you want to create drop-down menus for the blog categories as well as the pages on the site.
The solution I came up with was to set echo on wp_list_pages() so that I can dump the output into a variable and then search for the ‘Events
</a>
‘ and explode the variable there and place in the outputted string for the blog. (wp_list_menu() with echo)The only problem with this solution is that now the query to find the page name for the blog is hard coded, if my friend changes the page name (to just “News” for instance), the dropdown menu won’t work anymore.
So here is my question: How do I find out which page has been set to blog, when wordpress is in CMS mode?
- The topic ‘Using WordPress As A CMS’ is closed to new replies.