Home › Forums › Calendar Products › Events Calendar PRO › Breadcrumbs labeled as Archives
- This topic has 18 replies, 2 voices, and was last updated 8 years, 6 months ago by
Nancy.
-
AuthorPosts
-
August 26, 2017 at 12:20 pm #1340807
Nancy
ParticipantHi There,
I have added the events calendar Pro to my website. I am using breadcrumbs, and when I go to the events page, rather than the breadcrumbs saying: Home > EventsThey say: Home > Archive
How can I change the word Archive to say Events?
Thanks for your help!
Regards,
NancyAugust 28, 2017 at 7:23 am #1341132Victor
MemberHi Nancy!
Thanks for getting in touch with us! Let me try to help you with that.
I could see the breadcrumbs you are referring to and they seem to be something that your theme is showing.
I can see from your system information that you are using the template-blank-1.php as the Events template. You could try selecting a different template by going to Events > Settings > Display and see if you can get the breadcrumbs to not show for the calendar.
If they doesn’t disappear when using the Default Events Template then you should see if there is any option to modify the breadcrumbs in your theme settings.
Let me know how that goes and if you have any questions about it.
Best,
Victor.September 18, 2017 at 12:10 pm #1350818Nancy
ParticipantHi Victor,
So, I reached out to my support team at Themco, and they are telling me that I need to integrate the Archive Title term meta to my Events post type so that it returns the correct word.
Is there some php that could be added somewhere to solve this problem? I really need the breadcrumbs, so it’s not an option to turn them off.How can this be solved?
Thanks for your help.
September 19, 2017 at 6:11 am #1351075Victor
MemberHi Nancy!
Thanks for following up with this.
Could you please send us a copy of your theme in a private reply? We’ll try to have a look at it and see if we can come up with a way to solve this.
Thanks,
VictorSeptember 21, 2017 at 11:29 am #1352914Nancy
ParticipantHi Victor,
Thanks so much for your email. I am also working on a styling issue with
your team, and that has not been resolved. When that’s resolved, I’ll get
back to you about this issue. I don’t think it would be wise for you to be
working on your respective issues at the same time because php is involved.Thanks for your patience!
September 25, 2017 at 7:16 am #1354254Victor
MemberSure Nancy! No hurries. We’ll be here when that’s ready 🙂
Just a reminder, this thread will auto close after 3 weeks. In case that happens, you can always open a new topic referencing this one and we’ll continue with this.
Best,
VictorSeptember 27, 2017 at 9:11 am #1355593Nancy
ParticipantHey Victor,
I am ready to resume work on this issue. I’ve attached the theme. Let me
know if you need anything else.And just to clarify, what I hope will happen is that the user would click on
events and see the house icon followed by the word Events. I’m not looking
for each individual event to be in the breadcrumbs. . . just the word
Events.Thanks very much for your help.
Nancy
Youbydesignwebsites.com
Everyone has a story.
We can help you tell yours.September 28, 2017 at 9:13 am #1356169Victor
MemberHi Nancy!
Thanks for following up with this.
I don’t see the theme being attached to your post. If you replied by email, we unfortunately do not get the email attachments. Could you please send the theme in a private reply by using the web form?
You can also use a third party service like Dropbox or Google Drive.
Thanks,
VictorOctober 6, 2017 at 12:16 pm #1360546Nancy
ParticipantThis reply is private.
October 9, 2017 at 1:51 pm #1361265Victor
MemberThis reply is private.
October 9, 2017 at 2:08 pm #1361277Nancy
ParticipantAwesome! thanks very much Victor. I really appreciate it.
October 11, 2017 at 9:07 am #1362076Victor
MemberHi Nancy!
I came up with a way to manipulate the x_breadcrumbs() function from your theme.
Try placing the following code snippet into your theme’s functions.php file:
function x_breadcrumbs() { if ( x_get_option( 'x_breadcrumb_display' ) ) { GLOBAL $post; $is_ltr = ! is_rtl(); $stack = x_get_stack(); $delimiter = x_get_breadcrumb_delimiter(); $home_text = x_get_breadcrumb_home_text(); $home_link = home_url(); $current_before = x_get_breadcrumb_current_before(); $current_after = x_get_breadcrumb_current_after(); $page_title = get_the_title(); $blog_title = get_the_title( get_option( 'page_for_posts', true ) ); if ( ! is_404() ) { $post_parent = $post->post_parent; } else { $post_parent = ''; } if ( X_WOOCOMMERCE_IS_ACTIVE ) { $shop_url = x_get_shop_link(); $shop_title = x_get_option( 'x_' . $stack . '_shop_title' ); $shop_link = '<a href="'. $shop_url .'">' . $shop_title . '</a>'; } echo '<div class="x-breadcrumbs"><a href="' . $home_link . '">' . $home_text . '</a>' . $delimiter; if ( is_home() ) { echo $current_before . $blog_title . $current_after; } elseif ( is_category() ) { $the_cat = get_category( get_query_var( 'cat' ), false ); if ( $the_cat->parent != 0 ) echo get_category_parents( $the_cat->parent, TRUE, $delimiter ); echo $current_before . single_cat_title( '', false ) . $current_after; } elseif ( x_is_product_category() ) { if ( $is_ltr ) { echo $shop_link . $delimiter . $current_before . single_cat_title( '', false ) . $current_after; } else { echo $current_before . single_cat_title( '', false ) . $current_after . $delimiter . $shop_link; } } elseif ( x_is_product_tag() ) { if ( $is_ltr ) { echo $shop_link . $delimiter . $current_before . single_tag_title( '', false ) . $current_after; } else { echo $current_before . single_tag_title( '', false ) . $current_after . $delimiter . $shop_link; } } elseif ( is_search() ) { echo $current_before . __( 'Search Results for ', '__x__' ) . '“' . get_search_query() . '”' . $current_after; } elseif ( is_singular( 'post' ) ) { if ( get_option( 'page_for_posts' ) == is_front_page() ) { echo $current_before . $page_title . $current_after; } else { if ( $is_ltr ) { echo '<a href="' . get_permalink( get_option( 'page_for_posts' ) ) . '">' . $blog_title . '</a>' . $delimiter . $current_before . $page_title . $current_after; } else { echo $current_before . $page_title . $current_after . $delimiter . '<a href="' . get_permalink( get_option( 'page_for_posts' ) ) . '">' . $blog_title . '</a>'; } } } elseif ( x_is_portfolio() ) { echo $current_before . get_the_title() . $current_after; } elseif ( x_is_portfolio_item() ) { $link = x_get_parent_portfolio_link(); $title = x_get_parent_portfolio_title(); if ( $is_ltr ) { echo '<a href="' . $link . '">' . $title . '</a>' . $delimiter . $current_before . $page_title . $current_after; } else { echo $current_before . $page_title . $current_after . $delimiter . '<a href="' . $link . '">' . $title . '</a>'; } } elseif ( x_is_product() ) { if ( $is_ltr ) { echo $shop_link . $delimiter . $current_before . $page_title . $current_after; } else { echo $current_before . $page_title . $current_after . $delimiter . $shop_link; } } elseif ( x_is_buddypress() ) { if ( bp_is_group() ) { echo '<a href="' . bp_get_groups_directory_permalink() . '">' . x_get_option( 'x_buddypress_groups_title' ) . '</a>' . $delimiter . $current_before . x_buddypress_get_the_title() . $current_after; } elseif ( bp_is_user() ) { echo '<a href="' . bp_get_members_directory_permalink() . '">' . x_get_option( 'x_buddypress_members_title' ) . '</a>' . $delimiter . $current_before . x_buddypress_get_the_title() . $current_after; } else { echo $current_before . x_buddypress_get_the_title() . $current_after; } } elseif ( x_is_bbpress() ) { remove_filter( 'bbp_no_breadcrumb', '__return_true' ); if ( bbp_is_forum_archive() ) { echo $current_before . bbp_get_forum_archive_title() . $current_after; } else { echo bbp_get_breadcrumb(); } add_filter( 'bbp_no_breadcrumb', '__return_true' ); } elseif ( is_page() && ! $post_parent ) { echo $current_before . $page_title . $current_after; } elseif ( is_page() && $post_parent ) { $parent_id = $post_parent; $breadcrumbs = array(); if ( is_rtl() ) { echo $current_before . $page_title . $current_after . $delimiter; } while ( $parent_id ) { $page = get_page( $parent_id ); $breadcrumbs[] = '<a href="' . get_permalink( $page->ID ) . '">' . get_the_title( $page->ID ) . '</a>'; $parent_id = $page->post_parent; } if ( $is_ltr ) { $breadcrumbs = array_reverse( $breadcrumbs ); } for ( $i = 0; $i < count( $breadcrumbs ); $i++ ) { echo $breadcrumbs[$i]; if ( $i != count( $breadcrumbs ) -1 ) echo $delimiter; } if ( $is_ltr ) { echo $delimiter . $current_before . $page_title . $current_after; } } elseif ( is_tag() ) { echo $current_before . single_tag_title( '', false ) . $current_after; } elseif ( is_author() ) { GLOBAL $author; $userdata = get_userdata( $author ); echo $current_before . __( 'Posts by ', '__x__' ) . '“' . $userdata->display_name . $current_after . '”'; } elseif ( is_404() ) { echo $current_before . __( '404 (Page Not Found)', '__x__' ) . $current_after; } elseif ( is_archive() ) { if ( x_is_shop() ) { echo $current_before . $shop_title . $current_after; } elseif ( class_exists( 'Tribe__Events__Main' ) && tribe_is_event_query() ) { echo $current_before . 'Events' . $current_after; } else { echo $current_before . __( 'Archives ', '__x__' ) . $current_after; } } echo '</div>'; } }Let me know if it works for you.
Best,
VictorOctober 11, 2017 at 9:28 am #1362087Nancy
ParticipantHey Victor,
Thanks so much for this. I have not placed it in the theme yet as I am wondering if when the theme is updated, your php will be over written.Should I place this in the child theme?
Thanks very much.
October 11, 2017 at 4:18 pm #1362290Victor
MemberYes, that’s definitely the best choice. You should place it in your child theme so it does not get overwritten.
October 12, 2017 at 8:03 am #1362607Nancy
ParticipantHey Victor,
I tried adding it to the child theme, and the site broke. It produced a 500
error.Any ideas as to why that happened?
Nancy
Youbydesignwebsites.com
Everyone has a story.
We can help you tell yours. -
AuthorPosts
- The topic ‘Breadcrumbs labeled as Archives’ is closed to new replies.
