Support » Themes and Templates » alternative to child themes?

  • Essentially, I want to be able to assign a child theme to a specific page. Doesn’t seem possible, since you can only have one active template at a time. So I tried creating a new template file…

    Problem is that I want this new template to use a DIFFERENT stylesheet (so I can change out the graphics). I created a template and changed the code to get a different header file:

    get_header(); ?>

    Which I replaced with get_header2(); ?>

    But that didn’t work. Obviously there is other code in the system that doesn’t allow for variations in names of the header file.

    Any other workarounds?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Michael

    (@alchymyth)

    Forum Moderator

    there is a lot of info in the codex – for instance:

    http://codex.wordpress.org/Function_Reference/get_header

    Simon Prosser

    (@pross)

    Theme Review Admin

    if you use wp_enqueue_style to load the css file, you can use a conditional ..

    Hi Alchymyth,

    That page you gave me looks like it will have the answer, but unfortunately it’s written for programmers and assumes one understands a lot (many details missing from that page… probably included elsewhere). If I read it correctly, it seems that all I need to do is change

    <?php get_header(); ?>

    to this:

    get_header($alt); ?>

    Whereas my header file is called: header-alt.php. Unfortunately, it doesn’t work — it’s still bringing up the original header.php file.

    Also tried using this:

    <?php
    if ( is_fullpage() ) :
    get_header(‘alt’);
    else :
    get_header();
    endif;
    ?>

    But no luck. Any ideas?

    Michael

    (@alchymyth)

    Forum Moderator

    you could either use:

    get_header('2');
    and create a file
    header-2.php

    or for

    get_header('alt');
    you would use the file
    header-alt.php

    perfect! worked like a charm!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘alternative to child themes?’ is closed to new replies.