Wrong Category Title appearing on Events page

Hi, working in Renew stack/Pro and have a perplexing Category/Page/Post Title issue… which may or may not be answerable. Using The Modern Tribe Event Calendar plugin and all is working great with x except the page title is defaulting to one of my post categories. That’s despite the fact these ‘events’ are not even real posts. Doing a lot of testing and forum reading and many of the work arounds are CSS based, to just globally or singly hide a specific post title.

Is there a function I can add to the functions file to control what categories get page titles and which don’t?

And or what would probably do the trick is a function that would make “events” a category… as in like a portfolio page, or an alternate post format.

I would have used the category labeling but because the Events are not part of the Posts and in turn have their own categories I can’t use the nifty trick. I realize as I write this, it may be a question for Modern Tribe’s support – but thought I’d still run this through here and see if anyone else had experienced this.

page is here http://simconnectlive.com/session/building-a-compelling-work-culture/

Hi there,

Thanks for writing in.

You can’t do that to non-existing/not-real category or post because the condition should be met, example is_category('news'), without a condition it will then affect all other pages. And it’s not possible according to the information you gave. Plus, what you provided is a single tribe post and not a category page. The listing it has is this http://simconnectlive.com/schedule/ and it’s an archive page with no title. Is that what you wish to change, or just the text Latest News?

Thanks!

Rad, thanks for the reply and indentifying that as an archive page – and yes the only text I wish to change is “Latest News”. I get what you’re saying about the fact that the there’s no way to is_category(‘news’), without a condition.

And then it sounds like you are indicating there is a way to change that “Latest News”?
So since it’s an archive wrapper, is there function to exclude archive name?

I tried further working on the Modern Tribe template files and got no where since “Latest News” is part of X page wrapper.
Thank you!!

Hi,

You can actually change it under X > Launch > Options > Renew > Blog Title but that would change also in your single posts.

To change it for events only, create file _landmark-header.php file in x-child/framework/legacy/cranium/headers/views/renew/_landmark-header.php and copy the code below into that file.

<?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 elseif(is_singular('tribe_events')): ?>  
                <h1 class="h-landmark"><span>Events</span></h1>
            <?php else : ?>

              <h1 class="h-landmark"><span><?php echo x_get_option( 'x_renew_blog_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; ?>

In that code you can change the text Events to any text you like.

Hope that helps.

1 Like

Awesome I’ll give that a shot and let you know how it goes!

No worries! :slight_smile:

1 Like

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