-
AuthorPosts
-
September 21, 2014 at 11:36 am #109187
Hi Tangauta,
Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL as stated on the forum entrance page. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
Thank you.
September 24, 2014 at 12:34 pm #111605Speaking of breadcrumbs, I’m trying to remove them per specific page while keeping them across the rest of the site.
I tried looking into your template files but that doesn’t appear to be it. Any easy fix for this? 🙂
Thanks
September 24, 2014 at 2:35 pm #111675Could you provide us with your URL so we can look into this issue further.
Thanks!September 24, 2014 at 3:06 pm #111706This reply has been marked as private.September 24, 2014 at 4:37 pm #111762Hi Clov,
If you wish to hide just the breadcrumb for specific post/page, then add this code at your child theme’s functions.php
if ( ! function_exists( 'x_breadcrumbs' ) ) : function x_breadcrumbs() { global $post; if ( x_get_option( 'x_breadcrumb_display', 1 ) && strtolower( get_post_meta( $post->ID, 'disable_breadcrumb', true ) ) !== 'yes' ) { 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 ) ); $post_parent = $post->post_parent; if ( X_WOOCOMMERCE_IS_ACTIVE ) { $shop_url = x_get_shop_link(); $shop_title = x_get_option( 'x_' . $stack . '_shop_title', __( 'The Shop', '__x__' ) ); $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', 'Groups' ) . '</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', 'Members' ) . '</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; } else { echo $current_before . __( 'Archives ', '__x__' ) . $current_after; } } echo '</div>'; } } endif;
Then with selected post/page while editing, add new custom field named disable_breadcrumb with value of yes.
OR, if you wish to hide the entire landmark that create that spaces. Then just use Blank – No Container | Header, Footer template under your Page attribute section.
To reduce your custom headline’s spacing, just add man at your custome headline shortcode’s class attribute. And remove the empty headline above Scroll Down for More .
Cheers!
September 24, 2014 at 6:35 pm #111859This reply has been marked as private.September 24, 2014 at 7:47 pm #111884Hi there,
I just tested the code and its working. It will break if you pasted the code incorrectly. It should be added/appended at your child theme’s functions.php and not replacing what’s there already. And should be copied as is, no more, no less. Please check if partially copied the given code.
You may provide ftp access so we could check your functions.php.
Once fixed and you can’t find custom field, then enable it at Screen Options on top of your page you’re editing. Then scroll and find custom fields section.
And if you wish to maintain spacing for your headline without using empty headlines, then you may use gap shortcode.
Cheers!
September 25, 2014 at 2:20 am #112041I thought you could edit it from here: /wp-admin/theme-editor.php?file=functions.php&theme=x-child-integrity-light ?
I’ve tried pasting it in multiple times using HTML/PHP Editor (TextWrangler & Notepad++). I guess I’ll try again.
The Gap section works. 🙂 Thank you!
September 25, 2014 at 2:27 am #112044This reply has been marked as private.September 25, 2014 at 5:03 am #112106Hi,
Thanks for the login credentials.
I think it’s because we are using different version of the theme.
I am testing the code in xtheme version 2.5.1.Please update your theme and plugins.
http://theme.co/x/member/kb/updating-your-theme-and-plugins/
Please let us know if it solves the issue.
September 25, 2014 at 9:37 am #112279Great. It worked. I had installed the themes a few weeks back and didn’t think it would have a new version already so soon. Sorry for the confusion on my part. 🙂
I’ve done as you said, added the custom fields and all. And the breadcrumbs went poof. However, the container is still there.
Earlier on, you said to remove the Breadcrumbs and the container, to set the template to: “Blank – No Container | Header & Footer” but the crumbs container is still there. ANy help?
September 25, 2014 at 10:29 am #112323Hi Clovisd,
Thank you for writing in!
You can remove the container by adding the following CSS code under Custom > CSS in the Customizer:
.page-template-template-blank-4-php .x-breadcrumb-wrap { display: none; }
Hope this helps. 🙂
Thank you.
September 25, 2014 at 10:35 am #112327Great! All fixed. Thank you very much! ^_^
September 25, 2014 at 11:27 am #112384Glad we were able to help. 🙂 Have a nice day.
October 12, 2014 at 7:58 am #123759Hi Support,
Just wanted to add to this, is it possible to remove the breadcrumbs from all of my individual product pages (but keep it in the other pages such as product listing pages)? I’m using woocommerce.
I will reply separately with my url.
Thanks,
Jai -
AuthorPosts