Home › Forums › Calendar Products › Events Calendar PRO › X-theme + ECP integration issues (no title/breadcrumbs)
- This topic has 29 replies, 2 voices, and was last updated 8 years, 10 months ago by Brian.
-
AuthorPosts
-
June 7, 2015 at 11:09 am #967675BrianKeymaster
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.
June 7, 2015 at 1:21 pm #967707Ken CharityParticipantThanks 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.
June 8, 2015 at 7:24 am #967793BrianKeymasterOk great, glad that helps take another step forward on this.
June 9, 2015 at 7:31 am #968116Ken CharityParticipantI 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-09June 9, 2015 at 8:27 am #968160BrianKeymasterHi,
That is intentional for the Event View Pages.
We have this article explaining it and a way to stop it if you like:
June 9, 2015 at 8:39 am #968166Ken CharityParticipantAH 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?
June 9, 2015 at 5:39 pm #968292BrianKeymasterYep 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.
June 23, 2015 at 12:56 pm #972322Ken CharityParticipantHey 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/
June 23, 2015 at 4:41 pm #972407BrianKeymasterIt 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.
June 23, 2015 at 5:09 pm #972414Ken CharityParticipantI 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 );
June 24, 2015 at 5:43 am #972516BrianKeymasterI 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.
June 25, 2015 at 1:04 pm #972999Ken CharityParticipantSo 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?June 26, 2015 at 7:51 am #973170BrianKeymasterYep 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.
June 27, 2015 at 11:05 am #973343Ken CharityParticipantThanks 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?June 29, 2015 at 7:38 am #973497BrianKeymasterI 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.
-
AuthorPosts
- The topic ‘X-theme + ECP integration issues (no title/breadcrumbs)’ is closed to new replies.