Show full post on specific category page only

Hi,

If you are using PRO Header, Blog Title and category title will be replaced by your PRO Header.

You can try adding this in your child theme’s functions.php file.

/*  START -- Remove this if not using PRO Header  and integrity Stack */
function add_my_title() {   
    if(is_home()){
    ?>
    <header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_blog_title' ); ?></span></h1>
    <p class="p-landmark-sub"><span><?php echo x_get_option( 'x_integrity_blog_subtitle' ); ?></span></p>
  </header>
  
<?php }
if ( is_category()) { ?>

  <?php

  $meta     = x_get_taxonomy_meta();
  $title    = ( $meta['archive-title']    != '' ) ? $meta['archive-title']    : __( 'Category Archive', '__x__' );
  $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been categorized as ", '__x__' ) . '<strong>&ldquo;' . single_cat_title( '', false ) . '&rdquo;</strong>';

  ?>

  <header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span><?php echo $title ?></span></h1>
    <p class="p-landmark-sub"><span><?php echo $subtitle ?></span></p>
  </header>
  <?php
}}
add_action( 'x_after_view_global__slider-below', 'add_my_title', 10 );
/*  END -- Remove this if not using PRO Header  and integrity Stack */

Hope that helps

Thanks for the code, it worked just perfect!

You’re welcome! :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.