- This topic is empty.
- The forum ‘Other’ is closed to new topics and replies.
I would like to have 2 ways to display my posts; one with meta data and one without it… Is there a way to customize the single.php file so it show the meta data if the post is category 1 for example and don’t show it if the post is category 2…?
Hey Hubert, there most certainly is a way! Try putting this in your single.php file:
..put meta data here...
That will only show meta-data if the category of the post is category-1.
If you want to see what other conditional tags you can use with WordPress just take a look at this page: http://codex.wordpress.org/Conditional_Tags
In fact the code is : Thanks again!