Different Styles for different pages BUT without using is_page array
-
Is there anyway I can modify the is_page code so it can detect the parent of sub-pages.
To clarify that here’s an example this is what I got but I trimmed the CCS code to only one element to make things short.
/********************** START ************************/ if ( is_page(array('avdg','extension','pasantias','coordinaciones_avdg','coordinacion-tega','coordinacion-servicio-comunitario','depart_avdg','dpto-artes-visuales','dpto-diseno-grafico','dpto-teoria-e-historia')) ) { echo "<style type=\"text/css\"> #sidebar { border-left: ".$color_avdg." solid 1pt; } </style>"; } elseif ( is_page(array('artes-escenicas','depart_art_esce','dpto-de-actuacion')) ) { echo "<style type=\"text/css\"> #sidebar { border-left: ".$color_art_esce." solid 1pt; } </style>"; } /*----------------END-------------------------*/
So this works but the array is quite big besides that any time a page is added the array would have to be modified to add the new page is there anyway I can just define something like is_page(parent_page) so any child of parent page would be included in the if statement with out modifying the code?
Thanks in advanced.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Different Styles for different pages BUT without using is_page array’ is closed to new replies.