CONDITIONAL tag HELP with category
-
Using WP as a CMS, I’ve created a site for a preschool. I want to allow the director to be able to trigger a message box on the homepage with “Breaking News: School closed tomorrow b/c of bad weather”, simply by creating a post in the category called “alert”.
I would guess I need to use a conditional tag of some sort, that asks, “if there exists a post in the category named “alert”, then write (“echo”?) the following HTML (a block of code pulling in the the_title and the_content to display the message box)”.
I’ve hard coded the message box currently, as seen on https://www.carpenterskids.org however, I want this box to be dynamically triggered by the director simply making a post to the category “alert”.
- The topic ‘CONDITIONAL tag HELP with category’ is closed to new replies.