alternative to child themes? (6 posts)

  1. peteratomic
    Posted 5 years ago #

    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?

  2. Michael
    Forum Moderator
    Posted 5 years ago #

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


  3. Simon Prosser
    Theme Review Admin
    Posted 5 years ago #

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

  4. peteratomic
    Posted 5 years ago #

    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:

    if ( is_fullpage() ) :
    else :

    But no luck. Any ideas?

  5. Michael
    Forum Moderator
    Posted 5 years ago #

    you could either use:

    and create a file

    or for

    you would use the file

  6. peteratomic
    Posted 5 years ago #

    perfect! worked like a charm!

Topic Closed

This topic has been closed to new replies.

About this Topic