Site logo

Archived topic

Breadcrumb placement

4 replies · Started by Altti on March 19, 2019

Viewing posts 1–5 of 5

Hey there, I'm trying to add breadcrumbs to my custom header that I build with 'Elements'. I use a plugin: 'Breadcrumbs Simple' that gives a shortcode. The problem is that the breadcrumbs dont show where I put it. It appears out side of the header box.

Here is my simple header:

<div class="hero">
   [breadcrumb_simple]
   <h1>{{post_title}}</h1>
</div>

How can I get the breadcrumb to the place I want?

Hi there,

can you link me to your site so i can see the problem. You can edit your original topic and use the Site URL field for privacy.

URL added to original post.

There's something really weird about how GeneratePress handles breadcrumbs.

I changed the position of the breadcrumbs now. They are in a hook: after_header. I put it inside div: crumbs but somehow that disappears.

Here's my hook:

<div class="crumbs">
   [breadcrumb_simple]
</div>

And here's how it's HTML looks:

<div class="breadcrumb">
  <a href="https://url">Home</a>
  <span class="seprater">|</span>
  <span class="current">Page</span>
</div>

Hi there,

it looks like the shortcode is echoing its output as opposed to returning it. Which is the reason for it appearing outside of the div wrap you have added. You can see you empty div below the markup the shortcode creates.

Do you need the additional div wrap?

This archived topic is closed to new replies.