Determining which template part to get
-
hey all,
looking for some help with this.
trying to determine which template each page should use have got this so far,<?php if (is_page ('Home', 'About', 'Services', 'Pricelist', 'Contact')) ?> <?php get_template_part( 'loop-page'); ?> <?php if (is_page ('News')) ?> <?php get_template_part( 'loop-news');?> <?php if (is_page ('Portfolio')) ?> <?php get_template_part( 'loop-portfolio');?>
can anyone verify that this is correct and also explain why the news and portfolio pages are showing content even though i dont have any thing in the loop-news and loop-portfolio files.
Thanks in advance.
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘Determining which template part to get’ is closed to new replies.