Topic: Usage of if statement different css class
Hi all,
How can I use the if statement for change class of header class from homepage to diferent of other pages?
<?php
function specific_bgpages(){
if(is_home())
echo '<header>';
elseif(is_page() )
echo '<header class="bgpages">';
}
add_action('genesis_header', 'specific_bgpages');
?>I have try the code above but not work.
Nothing to.
Please help me ![]()
This code from work:
<?php
function specific_bgpages() {
if(is_pre_content())
echo '<header>';
elseif(is_post_content() )
echo '<header class="bgpages">';
}
Action::add('genesis_header', 'specific_bgpages');
?>and this to:
<?php
function specific_bgpages(){
if(is_home()){
echo '<header>';
} elseif(is_page()){
echo '<header class="bgpages">';
}
}
?> from forum help topic I have post at http://www.webhostingtalk.com/showthrea … ost9056876
