I wanted to know how to make it possible that if there is no post i would like to be able to hide the DIV that controls the latest blog post only having them appear when someone post somethign on a blog..
Somewhat like a position in joomla but in this case i am using wordpress
Expanding on ceejyaoz’s answer
If there aren’t posts, the HTML, and probably the
div
you are talking about, won’t show up. You can even use an else statement for a custom message if there are no posts.You can use the
have_posts()
function to detect whether there are any posts in the loop, and do conditionals based on that.