Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other WP – more than 1 single.php file…

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #31957

    Hi
    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…?
    Thanks
    Hubert

    #55858
    Johnnyb
    Member

    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

    #55036

    Thanks…
    In fact the code is : Thanks again!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Other’ is closed to new topics and replies.