Not showing static elements in Categories
-
Hey all I know when there are no posts and categories selected the page will display nothing and possibly a message if you have set one up to let visitors know there is no current content at the time.
But I wanted to know if you create say a template.php page to give your page a certain look… for instance I’m setting up a blog page where after each displayed post there is a 1px dotted bottom border – black as well I have a text link for those who want to share the post to Facebook. The border is applied in my css file and the link is hard coded into the template I’ve created for the blog page, but if I don’t post anything then the border and content is invisible but the link is still there as well I also have a topsy_retweet button there due to placing this code
<?phpif(function_exists('topsy_retweet_small')) echo topsy_retweet_small(); ?>
in my template after the loop statement.My question is is there a code statement that I can place in my template that would tell WP if I don’t have a category selected or post for it to not display anything including the static elements on the page? Sorry I don’t have a site link up as of yet for this to visually show and example but I hope it makes sense in theory…
Thanks.
- The topic ‘Not showing static elements in Categories’ is closed to new replies.