Breadcrumbs labeled as Archives

Home Forums Calendar Products Events Calendar PRO Breadcrumbs labeled as Archives

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #1340807
    Nancy
    Participant

    Hi 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 > Events

    They say: Home > Archive

    How can I change the word Archive to say Events?

    Thanks for your help!

    Regards,
    Nancy

    #1341132
    Victor
    Member

    Hi 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.

    #1350818
    Nancy
    Participant

    Hi 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.

    #1351075
    Victor
    Member

    Hi 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,
    Victor

    #1352914
    Nancy
    Participant

    Hi 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!

    #1354254
    Victor
    Member

    Sure 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,
    Victor

    #1355593
    Nancy
    Participant

    Hey 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.

    #1356169
    Victor
    Member

    Hi 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,
    Victor

    #1360546
    Nancy
    Participant

    This reply is private.

    #1361265
    Victor
    Member

    This reply is private.

    #1361277
    Nancy
    Participant

    Awesome! thanks very much Victor. I really appreciate it.

    #1362076
    Victor
    Member

    Hi 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__' ) . '&#8220;' . get_search_query() . '&#8221;' . $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__' ) . '&#8220;' . $userdata->display_name . $current_after . '&#8221;';
    
    } 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,
    Victor

    #1362087
    Nancy
    Participant

    Hey 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.

    #1362290
    Victor
    Member

    Yes, that’s definitely the best choice. You should place it in your child theme so it does not get overwritten.

    #1362607
    Nancy
    Participant

    Hey 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.

Viewing 15 posts - 1 through 15 (of 18 total)
  • The topic ‘Breadcrumbs labeled as Archives’ is closed to new replies.