-
Author
Tagged: breadcrumbs, title
-
April 28, 2015 at 16:51 #56453ITEXPERIENCEParticipant
Hi
Im writing you to inquire about the feasibility of displaying breadcrumbs under the title in the MAIN SECTION.
This feature would be useful in the category pages as well.
I have already set the title in main section but the breadcrumbs are not displayed yet.
Please find attached a screenshot to see an example.Thanks in advance for your support.
Regards
ITEXPERIENCE
Attachments:
You must be logged in to view attached files.April 28, 2015 at 16:53 #56455ITEXPERIENCEParticipantApril 28, 2015 at 17:05 #56456ITEXPERIENCEParticipantSorry but I’d like to add that the breadcrumbs display would be needed in the “product category’s pages” and in “single product’s pages” as well.
Thanks
ITEXPERIENCE
April 28, 2015 at 18:03 #56462sharmstrModeratorI’m hesitant to give you this code because I think it will open up a huge discussion about how to tweak the code to give you exactly what you want, which is a bit out of scope for help here. So, I’m going to give you this with the caveat that you’ll have to sort out styling, placement and other issues on your own.
Turn off breadcrumbs in theme options and try this in your functions.php file.
COPY CODEfunction kleo_title_main_content() { if (sq_option('title_location', 'breadcrumb') == 'main') { $title_status = true; if( is_singular() && get_cfield( 'title_checkbox' ) == 1 ) { $title_status = false; } if ( $title_status ) { echo '<div class="container">'; echo '<h1 class="page-title">' . kleo_title() . '</h1>'; echo '</div>'; } echo kleo_breadcrumb(array( 'show_browse' => false, 'separator' => ' ', 'show_home' => __( 'Home', 'kleo_framework' ), 'echo' => false )); } }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
April 28, 2015 at 18:47 #56464ITEXPERIENCEParticipantThanks for the advice but the code doesn’t work.
I put it in the function.php and i turn-off the breadcrumbs in the theme option.
Is there other suggestion you can give me, please?Regards
ITEXPERIENCE
April 28, 2015 at 19:18 #56468sharmstrModeratorAdd this below the function I gave you
COPY CODEadd_filter('woocommerce_show_page_title', 'kleo_title_main_content');
Not sure how to get it to show up on the single product page though.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
April 28, 2015 at 21:01 #56485ITEXPERIENCEParticipantI want to thank you meanwhile, but can you explain me the reason why the approach is different between the two pages.
I keep looking for this solution and I really appreciate your effort.
Thanks a lot.
ITEXPERIENCE
April 29, 2015 at 00:50 #56515sharmstrModeratorI dont know.
Anyhow, I played around with more code and I think this might be a better solution and it adds it to the single product page as well.
COPY CODEfunction kleo_title_main_content_woo() { if (sq_option('title_location', 'breadcrumb') == 'main') { $title_status = true; if( is_singular() && get_cfield( 'title_checkbox' ) == 1 ) { $title_status = false; } if ( $title_status ) { echo '<div class="container">'; echo '<h1 class="page-title">' . kleo_title() . '</h1>'; echo '</div>'; } echo kleo_breadcrumb(array( 'show_browse' => false, 'separator' => ' ', 'show_home' => __( 'Home', 'kleo_framework' ), 'echo' => false )); } } add_filter('woocommerce_show_page_title', 'kleo_title_main_content_woo'); add_action( 'woocommerce_before_single_product', 'kleo_title_main_content_woo' );
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.