amarinediary / WordPress-simple-URL-based-breadcrumb

🍞 A non-invasive WordPress unofficial plugin, minimalist and SEO friendly. both lightweight and lightning fast, adding URL based breadcrumb support. Plug-and-play, with no required configuration.
https://stackoverflow.com/a/67453887/3645650
Creative Commons Zero v1.0 Universal
27 stars 5 forks source link

Display "Home" instead of Site URL #6

Closed hanyseyedy closed 2 years ago

hanyseyedy commented 2 years ago

hi,

It is better to use the phrase "Home" instead of Site URL in first item of breadcrumb. Displaying URL and deleting "dash" causes problems. For example, in other languages or RTL, is not suitable at all. There is no necessity to display the site URL Instead of "home". Always set the first item "Home". For example, this site: https://jannah.tielabs.com/demo/ In all types of pages or posts, the first item is "Home".

001

002

Thank you very much if this is corrected. It is really necessary.

Thank you very much for your time

amarinediary commented 2 years ago

I'm not sure I understand the issue.

You can set the root crumb slug and url yourself, and it will be prepended to the crumbs. See Example: The bread with a root crumb

<?php

$ingredients = array(
    'root' => array(
        'slug' => 'home',
        'url' => get_home_url(),
    ),
);

the_bread( $ingredients );

And I think you're also asking why "category" isn't showing up ? Are you referring to: Breadcrumb behaviour for post types and taxonomies ? This is an intended behaviour, the plugin was designed for WordPress not for Woocommerce (which is a sub extension). In WordPress there is no category index page, on a WordPress blog accessing example.com/category/ result in a 404.

hanyseyedy commented 2 years ago

hi, I'm set slug and url for the root crumb, but this does not solve the problem. Look at the screenshot below. In addition to root, it also adds the site url and this is not appropriate. Only Home is enough. There is no need for a "hanytheme project" anymore.

sample-page

2- In the latter case, I did not mean WooCommerce, I just wanted to show that "Home" is placed on all pages and posts.

Regards

amarinediary commented 2 years ago

You're working on localhost, in a live site this won't show up. Localhost breadcrumb:

Home > Theme > Sample page

Live breadcrumb:

Home > Sample page

Does that answer your question ? You can also take a look at Localhost development issue

hanyseyedy commented 2 years ago

Oh. I didn't know! I thought there was a problem. I really apologize for taking your time