• Hi there,

    I’ve been trolling through loads of different forum posts here and on your Tribe site to learn how to change the title from showing the first event in the list.

    I’ve found out where the the_title() code is – in header.php of my theme, U-Design.

    Since my PHP knowledge is childlike at best, I’ve not been able to figure out how to implement your suggested fix with the “elseif tribe_is_month” code on your site.

    Here is the code where the_title() is found:

    <div id="page-title">
    <?php 			$post = $posts[0]; // Hack. Set $post so that the_date() works.
    			if (is_page()) : ?>
    			    <h1><?php the_title(); ?></h1>
    <?php			elseif ( is_single() ) : ?>
    			    <h1><?php the_title(); ?></h1>
    <?php			elseif (is_tax()) : /* If this is a taxonomy archive */
    			    $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );  ?>
    			    <h1 class="pagetitle"><?php echo ucwords( $term->taxonomy ) . ': ' . $term->name; ?></h1>
    <?php			elseif (is_category()) : /* If this is a category archive */ ?>
    <?php                       if ($udesign_options['show_archive_for_string'] == 'yes') : ?>
                                    <h1 class="pagetitle"><?php single_cat_title("", true); ?></h1>
    <?php                       else : ?>
    			    <h1 class="pagetitle"><?php printf( __('Archive for the ‘%s’ Category', 'udesign' ), single_cat_title("", false) ); ?></h1>
    <?php                       endif; ?>
    <?php			elseif (is_search()) : /* If this is a search results page */ ?>
    			    <h1 class="pagetitle"><?php printf( __('Search Results for ‘<em>%s</em>’', 'udesign' ), get_search_query() ); ?></h1>
    <?php			elseif (is_404()) : /* If this is a 404 page */ ?>
    			    <h1 class="pagetitle"><?php esc_html_e('Page Not Found (Error 404)', 'udesign'); ?></h1>
    <?php			elseif( is_tag() ) : /* If this is a tag archive */ ?>
    			    <h1 class="pagetitle"><?php printf( __('Posts Tagged ‘%s’', 'udesign' ), single_tag_title("", false) ); ?></h1>
    <?php			elseif (is_day()) : /* If this is a daily archive */ ?>
    			    <h1 class="pagetitle"><?php printf( __('Archive for %s', 'udesign' ), get_the_date() ); ?></h1>
    <?php			elseif (is_month()) : /* If this is a monthly archive */ ?>
    			    <h1 class="pagetitle"><?php printf( __('Archive for %s', 'udesign' ), get_the_time('F Y') ); ?></h1>
    <?php			elseif (is_year()) : /* If this is a yearly archive */ ?>
    			    <h1 class="pagetitle"><?php printf( __('Archive for %s', 'udesign' ), get_the_time('Y') ); ?></h1>
    <?php			elseif (is_author()) : /* If this is an author archive */ ?>
    			    <h1 class="pagetitle"><?php esc_html_e('Author Archive', 'udesign'); ?></h1>
    <?php			elseif (isset($_GET['paged']) && !empty($_GET['paged'])) : /* If this is a paged archive */ ?>
    			    <h1 class="pagetitle"><?php esc_html_e('Blog Archives', 'udesign'); ?></h1>
    <?php			else : // the case when a Title is NOT present the height should be maintained ?>
    			    <div class="no-title-present"></div>
    <?php			endif; ?>
    		    </div>

    Any idea how I can implement this title change? this is for a client’s site, and I’m scrambling to get this plugin to work for her.

    Thanks,
    Ryan

    https://www.ads-software.com/extend/plugins/the-events-calendar/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey helixriver, you still having problems on this end? I realize it’s been a few weeks since we posted this but if you’d like us to take a look, I can get someone to – let me know. Thanks for your patience so far.

    Thread Starter helixriver

    (@helixriver)

    Hey Roblagatta, yeah we’re still looking for a solution. Is there anything that can be done that doesn’t involve hardcoding the PHP?
    For example, even if you had a paid version the plugin that set up the heading/title as a chosen text (like “Upcoming Events”) that would be great.

    Hey helixriver,

    Take a look at this Gist for an example of how to do this in another theme: https://gist.github.com/jo-snips/aad337b8f0662d4df1b6 – you should be able to tailor that to your theme.

    Does that help?

    – Jonah

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Trying to change Events page title unsuccessfully’ is closed to new replies.