Post Title in Food Truck Demo

Good day,

I was wondering if you could kindly assist me. I am currently using xtheme’s Food Truck extended demo as a template for my website and would like the post title to replace the ‘News’ text as shown in the attached example:

On my website, the ‘News’ text is actually the Tagline of my website; I would like this to be the post title instead. I hope that makes sense.

Thanks for your help!

Hi @edwinfu,

Thank you for reaching out to us. You can change or completely remove the News title by navigating to Theme Options > Renew > Blog Options > Blog Title (see screenshot)

Hope this helps!

Hello Nabeel,

Thank you for the swift response.

I’m afraid it doesn’t address my issue. Is there some way to have ‘Blog Title’ be the title of individual posts instead?

Thank you once again.

Hi @edwinfu,

To do that, please install and activate the child theme. If you do not have the child theme installed yet, you can download it from here. Once you have it installed and activated, please login through FTP then go to wp-content/themes/x-child then go back to wp-content/themes/x/framework/legacy/cranium/headers/views/renew/ then copy the file _landmark-header.php and place it to wp-content/themes/x-child/framework/legacy/cranium/headers/views/renew/ then edit the file and replace the current file content to:

<?php

// =============================================================================
// VIEWS/RENEW/_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 );
$breadcrumbs        = x_get_option( 'x_breadcrumb_display' );

?>

<?php if ( ! x_is_blank( 1 ) && ! x_is_blank( 2 ) && ! x_is_blank( 4 ) && ! x_is_blank( 5 ) ) : ?>
  <?php if ( is_page() && $disable_page_title == 'on' ) : ?>

  <?php else : ?>

    <header class="x-header-landmark">
      <div class="x-container max width">
        <div class="x-landmark-breadcrumbs-wrap">
          <div class="x-landmark">

          <?php if ( x_is_shop() || x_is_product() ) : ?>

            <h1 class="h-landmark"><span><?php echo x_get_option( 'x_renew_shop_title' ); ?></span></h1>

          <?php elseif ( x_is_bbpress() ) : ?>

            <h1 class="h-landmark"><span><?php echo get_the_title(); ?></span></h1>

          <?php elseif ( x_is_buddypress() ) : ?>
            <?php if ( x_buddypress_is_component_with_landmark_header() ) : ?>

              <h1 class="h-landmark"><span><?php echo x_buddypress_get_the_title(); ?></span></h1>

            <?php endif; ?>
          <?php elseif ( is_page() ) : ?>

            <h1 class="h-landmark entry-title"><span><?php the_title(); ?></span></h1>

          <?php elseif ( is_home() || is_single() ) : ?>
            <?php if ( x_is_portfolio_item() ) : ?>

              <h1 class="h-landmark"><span><?php echo x_get_parent_portfolio_title(); ?></span></h1>

            <?php else : ?>

              <h1 class="h-landmark"><span><?php echo get_the_title(); ?></span></h1>

            <?php endif; ?>
          <?php elseif ( is_search() ) : ?>

            <h1 class="h-landmark"><span><?php _e( 'Search Results', '__x__' ); ?></span></h1>

          <?php elseif ( is_category() || x_is_portfolio_category() || x_is_product_category() ) : ?>

            <?php

            $meta  = x_get_taxonomy_meta();
            $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Category Archive', '__x__' );

            ?>

            <h1 class="h-landmark"><span><?php echo $title; ?></span></h1>

          <?php elseif ( is_tag() || x_is_portfolio_tag() || x_is_product_tag() ) : ?>

            <?php

            $meta  = x_get_taxonomy_meta();
            $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Tag Archive', '__x__' );

            ?>

            <h1 class="h-landmark"><span><?php echo $title ?></span></h1>

          <?php elseif ( is_404() ) : ?>

            <h1 class="h-landmark"><span><?php _e( 'Oops!', '__x__' ); ?></span></h1>

          <?php elseif ( is_year() ) : ?>

            <h1 class="h-landmark"><span><?php _e( 'Post Archive by Year', '__x__' ); ?></span></h1>

          <?php elseif ( is_month() ) : ?>

            <h1 class="h-landmark"><span><?php _e( 'Post Archive by Month', '__x__' ); ?></span></h1>

          <?php elseif ( is_day() ) : ?>

            <h1 class="h-landmark"><span><?php _e( 'Post Archive by Day', '__x__' ); ?></span></h1>

          <?php elseif ( x_is_portfolio() ) : ?>

            <h1 class="h-landmark"><span><?php the_title(); ?></span></h1>

          <?php endif; ?>

          </div>

          <?php if ( $breadcrumbs == '1' ) : ?>
            <?php if ( ! is_front_page() && ! x_is_portfolio() ) : ?>
              <div class="x-breadcrumbs-wrap">
                <?php x_breadcrumbs(); ?>
              </div>
            <?php endif; ?>
          <?php endif; ?>

          <?php if ( x_is_portfolio() ) : ?>
            <div class="x-breadcrumbs-wrap">
              <?php x_portfolio_filters(); ?>
            </div>
          <?php endif; ?>

        </div>
      </div>
    </header>

  <?php endif; ?>
<?php endif; ?>

Then add this code in X > Theme Options > CSS:

.single-post .entry-title {
    display: none;
}

Kindly note that since this is a custom code that changes the default behavior/display of the theme, you will be responsible to maintain or update the code in case you require further changes or if the code stops working in future updates. If you are uncertain how to proceed, it would be best to get in touch with a developer.

Hope this helps.

Thank you so much for your help, Jade. It is very detailed and comprehensive.

I have a separate question for a website using the Ethos stack. There is a horizontal, thin (1 pixel) white line just beneath the menu that runs across the page. Is there some way to remove it or at least make it dark brown or black? The current white does not match the website’s darker color scheme.

Thank you for any help you can provide me. Have a great day!

Hello @edwinfu,

You can get rid of the line below the menu by using this custom css:

.x-navbar-wrap,
.x-navbar {
    margin-bottom: 0 !important;
    border: none;
}

We would love to know if this has worked for you. Thank you.

Hello RueNel,

I have inserted the code into custom css, but it did not work. Do you have any other ideas?

Thanks

Hi @edwinfu,

Try adding the following code in your child theme’s style.css file instead:

body .masthead .x-navbar {
    border-bottom: none !important;
    box-shadow: none !important;
}

Don’t forget to clear all caches including your browser’s cache after adding the code. Let us know how this goes!

Thank you, Nabeel!

You’ve found the fix. Thanks a bunch.

You’re welcome!
We’re glad @Nabeel were able to help you out.

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