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
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.
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.