• Hi,

    I created a separate template file (latin.php) to use on a page (latin [I set permalinks to use the postname]) as well as a new header (latin_header.php) which calls a new style sheet (latin-style.css).

    The rest of the site uses the default (page.php; header.php; style.css).

    By typing in the following code into header.php, I can get the page (latin) to change its look:

    <?php if (is_page('latin')) { ?>
    <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/latin-style.css" type="text/css">
    <?php }; ?>

    When I create subpages for the page (latin), however, I mark for them to use the “latin” template in the drop down menu on the right, but nothing changes. Also, if I take out the conditional code I posted and try to make the page (latin) use the template from the admin page, nothing works, it simply calls up the default page.php and looks like the rest of the site in color, banner, etc.

    Any thoughts on this? Is there code that can pull up all subpages to (latin)? Is there some reason that the templates do not come up when trying to use them from the admin and page editing/creation section?

    (also I found this post but I could not get some of the code to work.)

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘is_page with children pages’ is closed to new replies.