If on Category page print category title as link
-
If on Category page should show category title as link. Using this code:
function genesis_do_header_2() { if ( genesis_get_option('header_right') ) { echo '<div class="page-title">'; if(is_home()) echo '<a href="'. get_bloginfo('url') .'">Home</a>'; elseif(is_category()) echo '<a href="'. get_category_link() .'">'. single_cat_title() .' </a>'; else echo '<a href="'. get_permalink() .'">'. get_the_title() .' </a>'; echo '</div><!-- end .page-title -->'; } }
causes a malfunctioning category overview page. Any ideas why?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘If on Category page print category title as link’ is closed to new replies.