Forums

How do I use a custom single.php template for my Custom Post Types? (3 posts)

  1. deziiner
    Member
    Posted 1 year ago #

    I'm using Custom Post Types in my WP installation to create a, sort of, 'database' of bands. I plan on displaying each post/band listing as a SINGLE post, but make it look like a band profile/bio page.

    For example:

    .../bands/profile/the-band-name/

    Now, I can't seem to finger out how to display a single entry properly... when accessing the link, the Custom Post entry displays as if it were a regular post. Is there a way to determine in single.php if you're displaying a Custom Post type entry rather than a regular entry? Like, for example, is there an if statement like the following:

    if (post_type('band-profile'))

    Can anyone help with this?

  2. deziiner
    Member
    Posted 1 year ago #

    Help?

  3. flick
    Member
    Posted 1 year ago #

    My post type is called 'game', so I use single-game.php to display the 'game' custom post type.

Topic Closed

This topic has been closed to new replies.

About this Topic