tareq1988 / wedocs

A documentation theme for WordPress
http://docs.wedevs.com
394 stars 129 forks source link

Wrong breadcrumbs for posts without parents. #30

Open aabouzaid opened 8 years ago

aabouzaid commented 8 years ago

Hello, The breadcrumbs of posts without parents always get "Docs" in breadcrumbs, and actually there is no page is called "Docs" at all (so it's returns 404).

How it does look like: old_single_page_wedocs_theme_small

How it should be: new_single_page_wedocs_theme_small

I believe this related to that part in "lib/custom.php" (and yeah, I'm using "develop" branch):

echo '<a href="' . $homeLink . '/' . $slug['slug'] . '/">' . $post_type->labels->singular_name . '</a>';
if ($showCurrent == 1) echo ' ' . $delimiter . ' ' . $before . get_the_title() . $after;

And should be replaced with:

if ($showCurrent == 1) echo ' ' . $before . get_the_title() . $after;

If I get it right and this is not intended, I will make a PR. Thanks a lot.

ufukayyildiz commented 7 years ago

hi,

thank you for this. this is fixed my problem.

if you have any idea about this issue, can you share ? https://github.com/tareq1988/wedocs-plugin/issues/23

thank you in advance.

ufukayyildiz commented 7 years ago

hi again,

solution is here ; tareq1988/wedocs-plugin#24

thanks to @HenchmenMedia