Grow your CSS skills. Land your dream job.

Diferent Sidebar for Child of

  • Rai
    # February 10, 2012 at 2:12 pm

    Hi There,

    I need to set a different sidebar for diferente pages and I will like to set and special one for all the childs of one page. Can you help me with the code to do it?.

    Here is my code:
    *In second line I need to replace the “is_child_of for something that work.


    < ?php
    if ( is_child_of('page-contacto.php') ){ ?>
    < ?php get_sidebar('contact'); ?> funciona

    < ? } elseif ( is_page('apky') ){ ?>
    < ?php get_sidebar('apky'); ?>

    < ? } else { ?>
    < ?php get_sidebar(); ?>
    < ? }
    ?>

    Blessings.
    Rai Singh.

    Rai
    # February 10, 2012 at 2:13 pm

    Any suggestions will be good!. Otherwise I will need to do page templates.

    Rai
    # February 10, 2012 at 2:22 pm

    Mmm, I all ready do page templates. I don´t find the solution to do it in that way. But any way I save two birds with this, instead of have two pages for it now I have just one template.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".