X-theme + ECP integration issues (no title/breadcrumbs)

Home Forums Calendar Products Events Calendar PRO X-theme + ECP integration issues (no title/breadcrumbs)

Viewing 15 posts - 16 through 30 (of 30 total)
  • Author
    Posts
  • #967675
    Brian
    Keymaster

    Also, I would try changing the Event Template using this setting as that might help in this case:

    Head to this page:

    Events > Settings > Display Tab

    Then change this setting:

    Events Template to Default Page Template

    That might enable the breadcrumbs to work better.

    #967707
    Ken Charity
    Participant

    Thanks for that last bit of advise. What’s interesting is that I had the template setting on (Blank – Container | Header, Footer) which is one of the templates provided by x-theme.

    I decided to try the default events template on whim and behold there were breadcrumbs (using both the standard x-theme function and the Yoast SEO plugin).

    So now I guess I can build out template to work as I need it, adding the proper code to make it look like the x-theme template more.

    #967793
    Brian
    Keymaster

    Ok great, glad that helps take another step forward on this.

    #968116
    Ken Charity
    Participant

    I dont know if it’s a bug or not but when I have no future events and I click view: list/week/day/map/photo

    I get a a 404 page in the breadcrumbs. So it seems to be falling back to this part of the code:

    } elseif ( is_404() ) {
     
              echo $current_before . __( '404 (Page Not Found)', '__x__' ) . $current_after;

    Is there a check I should add to the is_404() something that if it is also a event page and return ‘no events found’?

    There are also two “Previous Events” under the Tribe event notification.
    http://ehs.designerken.com/events/photo/?tribe-bar-date=2015-06-09

    #968160
    Brian
    Keymaster

    Hi,

    That is intentional for the Event View Pages.

    We have this article explaining it and a way to stop it if you like:

    https://theeventscalendar.com/knowledgebase/404_and_seo/

    #968166
    Ken Charity
    Participant

    AH OK, no I think that makes sense, however I think instead of it being a page not found, the breadcrumbs should read home>events>no events found and not home>404 (page not found)

    So then I assume that I can add in the check to see if it is 404 and a event page and output the correct verbiage?

    #968292
    Brian
    Keymaster

    Yep looks like an additional check would have to take place to detect 404 and the Event View so you can put in your own message in the breadcrumbs.

    #972322
    Ken Charity
    Participant

    Hey Brian,

    I have started back up on this project, I have the 404 breadcrumbs outputting the copy “no events scheduled” for the dates that dont have any events instead of “page not found”.

    But there is an issue with the <title> tag that also lists the page as “Page not found” and the body class is listing a ‘error404’.

    The meta file for outputting the title is:

    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php wp_title( '' ); ?></title>
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">

    I tried to use <?php echo get_the_title(); ?> instead but get nothing output.

    Here is a page instance to reference: http://ehs.designerken.com/events/week/

    #972407
    Brian
    Keymaster

    It looks like you have to use the wp_title filter to change the output. You maybe to use the same conditionals from the breadcrumbs.

    This link has an example:

    https://codex.wordpress.org/Function_Reference/wp_title

    Look for the “Customizing with the filter” section.

    #972414
    Ken Charity
    Participant

    I was playing with that but no luck on the same page.

    Here is the code:

    function theme_name_wp_title( $title, $sep ) {
    	if ( is_404() ) {
    		return $title;
    	}
    	
    	global $page, $paged;
    	
    	if ( tribe_is_past() || tribe_is_upcoming() && !is_tax() ) { // List View Page
    			
    		$title .=  __( 'No events scheduled.' , 'ehs' );
    		return $title;
    	
    		} elseif ( tribe_is_day() && !is_tax() ) { // Day View Page
    		return $title;
    
    		$title .=  __( 'No events scheduled.' , 'ehs' );
    		return $title;
    
    		} elseif ( tribe_is_week() && !is_tax() ) { // Week View Page
    
    		$title .=  __( 'No events scheduled.' , 'ehs' );
    		return $title;
    
    		} elseif ( tribe_is_map() && !is_tax() ) { // Map View Page
    
    		$title .=  __( 'No events scheduled.' , 'ehs' );
    		return $title;
    
    		} elseif ( tribe_is_photo() && !is_tax() ) { // Photo View Page
    
    		$title .=  __( 'No events scheduled.' , 'ehs' );
    		return $title;
    
    	} else {
    
    		return $title;
    
    	}
    }
    add_filter( 'wp_title', 'theme_name_wp_title', 10, 2 );
    #972516
    Brian
    Keymaster

    I am sorry but as I have said before I cannot troubleshoot every step of this project.

    I have done way more then I could for it as a customization and you are unfortunately, on your own to figure it out.

    #972999
    Ken Charity
    Participant

    So can I just clarify then that the default nature of ECP is to display ‘page not found’ in the title tags?

    <title>Events for July 2, 2015 | Page not found | WP Shindig!</title>

    is rendered on this page of your demo: http://wpshindig.com/events/2015-07-02/
    When no event is found for that day.

    <title>Events for week of July 5, 2015 | Page not found | WP Shindig!</title>

    is rendered on this page of your demo: http://wpshindig.com/events/week/2015-07-05
    When no event is found for that week.

    Since my theme only calls <title><?php wp_title(''); ?></title> does ECP override this in it’s code?

    #973170
    Brian
    Keymaster

    Yep we use the filter on wp_title.

    We do it from this template:

    the-events-calendar\src\Tribe\Template_Factory.php

    add_filter( ‘wp_title’, array( $this, ‘title_tag’ ), 10, 2 );

    You maybe to change the priority of your filter to 15 to get it to run after ours.

    #973343
    Ken Charity
    Participant

    Thanks Brian that helps, I also think there was an issue with Yoast SEO I stumbled across another thread with that and am getting closer to sorting that out.

    I am trying to keep my posts more general now and related to TEC:

    So I was experimenting with categories (some with events and some without.

    When I have this:

           } elseif ( tribe_is_event() ) {
           	       
    		    if ( is_singular( 'tribe_events' ) ) {
    
    					echo $current_before . '<a href="' . tribe_get_events_link() . '">Events</a>' . $delimiter . $page_title . $current_after; // we are on a single event page
    
    			} elseif ( tribe_is_month() && !is_tax() ) { // Month View Page
    	
    				echo $current_before . __( 'Events Calendar', 'ehs' ) . $current_after;
    
    			 } elseif ( tribe_is_month() && is_tax() ) { // Month View Category Page
    	
                	echo $current_before . __( 'Events Calendar Category', 'ehs' ) . $current_after;
    
    }
    } elseif ( is_archive() ) {
    echo $current_before . __( 'Archives ', '__x__' ) . $current_after;
    }

    On category with events I get ‘Events Calendar Category’ output with no events I get ‘Archives’

    But with if I remove the tribe_is_event() function from around the other if/then and have it as:

    } elseif ( is_singular( 'tribe_events' ) ) {
    
    					echo $current_before . '<a href="' . tribe_get_events_link() . '">Events</a>' . $delimiter . $page_title . $current_after; // we are on a single event page
    
    			} elseif ( tribe_is_month() && !is_tax() ) { // Month View Page
    	
    				echo $current_before . __( 'Events Calendar', 'ehs' ) . $current_after;
    
    			 } elseif ( tribe_is_month() && is_tax() ) { // Month View Category Page
    	
                	echo $current_before . __( 'Events Calendar Category', 'ehs' ) . $current_after;

    The output is the same for both categories with and without events associated. Why would this be? Is the check tribe_is_event() not working if no event is tied to a category?

    #973497
    Brian
    Keymaster

    I am sorry, but as I have stated I am not able to provide support on customizations.

    Unfortunately, we are not available to troubleshoot or teach how the plugin works as it is beyond our terms and conditions.

    I have provided way beyond what I can do for this and since that is the case I am now closing this thread.

    If you have technical support questions about existing features please create a new thread and we can help you out.

Viewing 15 posts - 16 through 30 (of 30 total)
  • The topic ‘X-theme + ECP integration issues (no title/breadcrumbs)’ is closed to new replies.