Support » Themes and Templates » Help with conditional tags within single.php

  • Resolved stylishjm


    So I’m using yootheme which is really annoying for custom post types as I cant seem to work out to create them without ending up with a blank unformatted page, so I’m attempting conditional tags within single.php to do the following:

    If page belongs to the wp e-commerce post type, hide the header, otherwise show it (as I need it for the blog section.

    ‘<?php if(get_post_type($post) == ‘wpsc-product’) {?>
    <div> derp, this is a single product page </div>

    <?php } else; {?>


    All the header stuff would be in here


    <?php }?>’

    When used, I can see the “derp, this is a single product page” only on my product pages which is great! However the header is still showing.

    If I were to manually delete the header section within this template, then it will obviously not show.

    Any ideas?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Help with conditional tags within single.php’ is closed to new replies.