I’m using the WP plugin Really Simple Breadcrumbs and it generates these links for me:
<div class="breadcrumb">
<a href="http://example.com"> Example 1 </a>
" >> "
<a href="http://example2.com"> Example 2 </a>
" >> Blog Page Title Lorem"
</div>
I need to change two things in this html. One, I need to rewrite the first link to say <a href="/blog"> Blog </a>
. Second, I need the trailer “Blog Page Title Lorem” to be deleted. Third, I’d like to change the >>
to >
. I think all of these would use the same technique so Im listing them all in the same question. I’m open to JS, jQuery, CSS display/hide tricks, whatever works. How do I do this?
If you go into the plugin folder you will find breadcrumb.php
In that file there will be a variable called
$seperator
that has its value set to>>
and you should be able to alter it there.If you want to change any the CSS for for the
<a>
just use.breadcrumb a
in your style.css file.As for changing the content titles, those are generated by the plugin via the information in your database ( titles, slugs, permalinks etc etc ). The first link SHOULD take your blog title as its paramater. If it’s not, before the loop starts in breadcrumb.php you could also write that in before so that it’s always generated.
Blog page lorem being the last in the crumbs should be assigned to whatever page you have. If you can find the spot in breadcrumb.php that generates that, you could delete it and put this in there:
the_title();
Best of Luck.
To set the
href
of the first element,index
which is first argument ineach
could be used.Try this:
Fiddle here