Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1356574
    Steve C
    Participant

    I have just realised that some pages do not show the page title anymore. I have disabled the apge title for some pages on the site but would like it to dsplay on most of them.

    For the pages where I want the page title to be hidden I have selected the option to ‘Disable Page Title’ when editing the pages.

    Is there a reason that the titles have been hidden from all the pages though?
    Even when the ‘Disable Page Title’ option is deselcected.

    The site having issue is http://ridetiming.co.uk

    Thanks,
    Steve

    #1356658
    Lely
    Moderator

    Hello Steve,

    Thanks for posting in.
    It is because of the PAGE TEMPLATE you where using. Blank Container | Header, Footer doesn’t have page title by default. If you want to add page title on that template, please copy _landmark-header.php from this folder wp-content\themes\x\framework\views\integrity and then paste it on the same folder on your child theme here: wp-content\themes\x-child\framework\views\integrity

    Open the copied file and replace the entire content with the following:

    
    <?php
    // =============================================================================
    // VIEWS/INTEGRITY/_LANDMARK-HEADER.PHP
    // -----------------------------------------------------------------------------
    // Handles content output of large headers for key pages such as the blog or
    // search results.
    // =============================================================================
    $disable_page_title = get_post_meta( get_the_ID(), '_x_entry_disable_page_title', true );
    $disable_filters    = get_post_meta( get_the_ID(), '_x_portfolio_disable_filtering', true );
    ?>
    <?php if ( is_home() && x_get_option( 'x_integrity_blog_header_enable' ) == '1' ) : ?>
    <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 elseif ( is_search() ) : ?>
    <header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span><?php _e( 'Search Results', '__x__' ); ?></span></h1>
    <p class="p-landmark-sub"><span><?php _e( "Below you'll see everything we could locate for your search of ", '__x__' ); echo '<strong>&ldquo;'; the_search_query(); echo '&rdquo;</strong>'; ?></span></p>
    </header>
    <?php elseif ( is_category() || x_is_portfolio_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 elseif ( x_is_product_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 items 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 elseif ( is_tag() || x_is_portfolio_tag() ) : ?>
    <?php
    $meta     = x_get_taxonomy_meta();
    $title    = ( $meta['archive-title']    != '' ) ? $meta['archive-title']    : __( 'Tag Archive', '__x__' );
    $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been tagged as ", '__x__' ) . '<strong>&ldquo;' . single_tag_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 elseif ( x_is_product_tag() ) : ?>
    <?php
    $meta     = x_get_taxonomy_meta();
    $title    = ( $meta['archive-title']    != '' ) ? $meta['archive-title']    : __( 'Tag Archive', '__x__' );
    $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all items that have been tagged as ", '__x__' ) . '<strong>&ldquo;' . single_tag_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 elseif ( is_404() ) : ?>
    <header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span><?php _e( 'Oops!', '__x__' ); ?></span></h1>
    <p class="p-landmark-sub"><span><?php _e( "You blew up the Internet. ", '__x__' ); ?></span></p>
    </header>
    <?php elseif ( is_year() ) : ?>
    <header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span><?php _e( 'Post Archive by Year', '__x__' ); ?></span></h1>
    <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'Y' ); echo '</strong>'; ?></span></p>
    </header>
    <?php elseif ( is_month() ) : ?>
    <header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span><?php _e( 'Post Archive by Month', '__x__' ); ?></span></h1>
    <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'F, Y' ); echo '</strong>'; ?></span></p>
    </header>
    <?php elseif ( is_day() ) : ?>
    <header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span><?php _e( 'Post Archive by Day', '__x__' ); ?></span></h1>
    <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'F j, Y' ); echo '</strong>'; ?></span></p>
    </header>
    <?php elseif ( x_is_portfolio() ) : ?>
    <?php if ( $disable_page_title != 'on' || $disable_filters != 'on' ) : ?>
    <header class="x-header-landmark x-container max width">
    <?php if ( $disable_page_title != 'on' ) : ?>
    <h1 class="h-landmark"><span><?php the_title(); ?></span></h1>
    <?php endif; ?>
    <?php x_portfolio_filters(); ?>
    </header>
    <?php endif; ?>
    <?php elseif ( x_is_shop() && x_get_option( 'x_integrity_shop_header_enable' ) == '1' ) : ?>
    <header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_shop_title' ); ?></span></h1>
    <p class="p-landmark-sub"><span><?php echo x_get_option( 'x_integrity_shop_subtitle' ); ?></span></p>
    </header>
    <?php elseif ( x_is_buddypress() ) : ?>
    <?php if ( x_buddypress_is_component_with_landmark_header() ) : ?>
    <header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span><?php echo x_buddypress_get_the_title(); ?></span></h1>
    <p class="p-landmark-sub"><span><?php echo x_buddypress_get_the_subtitle(); ?></span></p>
    </header>
    <?php endif; ?>
    <?php elseif ( x_is_blank( 1 )) : ?>
    <header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span><?php the_title(); ?></span></h1>
    </header>
    <?php endif; ?>

    This part was added at the end:

     <?php elseif ( x_is_blank( 1 )) : ?>
    <header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span><?php the_title(); ?></span></h1>
    </header>

    Hope this helps.

    #1356791
    Steve C
    Participant

    Thanks for helping with that, it seems to have made the headers show on the pages using the template ‘Blank – Container | Header, Footer’, but not for pages using other templates.

    I would also like to enable the page titles for pages using the template ‘Blank – No Container | Header, Footer’.
    I’d like to enable page titles for ALL pages / templates except the ones I specifically select ‘Disable Page Title’ on.

    Is this possible?

    Here is an example of a page using the No Container template: http://ridetiming.co.uk/event-extras/

    Cheers,
    Steve

    #1357286
    Rad
    Moderator

    Hi Steve,

    Hmm, could we check it directly? Would you mind providing the admin and FTP login credentials? Have you turned on Disable Page Title on all the pages? You don’t need any custom code at all if you just wish it to be specific to a page, but if it’s gone without turning on that option then it could be a bug. And we’ll ned to check it directly.

    Thanks!

    #1359368
    Steve C
    Participant
    This reply has been marked as private.
    #1359373
    Christopher
    Moderator

    Hi there,

    Please update this line of code :

    <?php elseif ( x_is_blank( 1 )) : ?>
    

    to :

    <?php elseif ( x_is_blank( 1 ) || x_is_blank( 2 ) || x_is_blank( 4 ) || x_is_blank( 5 )) : ?>
    

    Hope it helps.

  • <script> jQuery(function($){ $("#no-reply-1356574 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>