Support » Theme: Twenty Ten » [Theme: Twenty Ten] get_template_part new part not showing up

  • Resolved hayley@ohmedia.ca

    (@hayleyohmediaca)


    Hey, I’m using Twenty Ten as a theme base. I created a custom template file for a certain part of the site I needed to look differently.

    template file name: portfolio-template.php
    get_template_part file name: loop-portfolio.php
    code used in portfolio-template.php:

    <?php
    get_template_part( 'loop', 'portfolio' );
    ?>

    This follows the same pattern as the existing loop-page.php, loop-single.php, etc. but nothing inside loop-portfolio.php is printed to the screen. I edited portfolio-template.php to use

    <?php
    get_template_part( 'loop', 'page' );
    ?>

    and that works. I’m not sure where my roadblock is – the syntax of get_template_part, or loop-portfolio.php itself.

    Thanks!

    http://wordpress.org/extend/themes/twentyten/

Viewing 1 replies (of 1 total)
  • Aha ha ha ha weird. I decided to try it one more time, again starting from scratch with the code from loop-page.php, and it worked. I’m guessing my previous try had some sort of bad code in it. Resolved!

Viewing 1 replies (of 1 total)
  • The topic ‘[Theme: Twenty Ten] get_template_part new part not showing up’ is closed to new replies.