Replies: 2 comments 3 replies
-
Hi Sean, copy the breadcrumb function to your child is the correct way. At a first glance to your code, you didn't change anything? That's why you see no changes? Try this: function the_breadcrumb() {
if (!is_home()) {
echo '<nav class="breadcrumb mb-4 mt-2 bg-warning text-white py-2 px-3">';
echo '<a href="' . home_url('/') . '">' . ('Home') . '</a><span class="divider text-success"> » </span>';
if (is_category() || is_single()) {
the_category(' <span class="divider text-success"> » </span> ');
if (is_single()) {
echo ' <span class="divider text-success"> » </span> ';
the_title();
}
} elseif (is_page()) {
echo the_title();
}
echo '</nav>';
}
}
add_filter('breadcrumbs', 'breadcrumbs'); Outputhttps://dev.bootscore.me/2012/01/07/template-sticky/ Does this help? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi Basti,
I just copied the original code to make it simple.. I wasn't able to debug
my code as it would only display the original.
I'll try again and get back to you.
Also how does the final line work with add filter?
…On Fri, 30 Sep 2022, 4:01 am Basti, ***@***.***> wrote:
Hi Sean,
copy the breadcrumb function to your child is the correct way. At a first
glance to your code, you didn't change anything? That's why you see no
changes?
Try this:
function the_breadcrumb() {
if (!is_home()) {
echo '<nav class="breadcrumb mb-4 mt-2 bg-warning text-white py-2 px-3">';
echo '<a href="' . home_url('/') . '">' . ('Home') . '</a><span class="divider text-success"> » </span>';
if (is_category() || is_single()) {
the_category(' <span class="divider text-success"> » </span> ');
if (is_single()) {
echo ' <span class="divider text-success"> » </span> ';
the_title();
}
} elseif (is_page()) {
echo the_title();
}
echo '</nav>';
}
}
add_filter('breadcrumbs', 'breadcrumbs');
Output
[image: screenshot]
<https://user-images.githubusercontent.com/51531217/193231646-124361de-27e6-4abe-8c24-e4c4ccda0b93.png>
https://dev.bootscore.me/2012/01/07/template-sticky/
Does this help?
—
Reply to this email directly, view it on GitHub
<#272 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARTWGAZ4OC2KN7QQVV7QDCDWA2T5BANCNFSM6AAAAAAQZNYS6E>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have spent a fair amount of time digging into this theme and its great!
I am wondering if anyone could help me on how to customize the breadcrumbs, I can't get my head around it.
I have tried copying and pasting the whole block from functions.php into a child theme and removing the first and last lines so the following is in the child theme:
But it won't override the breadcrumbs.
I have also tried looking through the theme to figure out how its hooked in, but I cant figure that out either.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions