- This topic has 11 replies, 4 voices, and was last updated 5 years, 2 months ago by Leo.
-
AuthorPosts
-
August 11, 2015 at 12:33 pm #128451Steven Porters
Is there a way or add on on the Generate Press theme that enables breadcrumbs on the theme?
If not, is there any plans for this in the future? It’d be helpful on my site. :]
August 11, 2015 at 4:20 pm #128477TomLead DeveloperLead DeveloperHi there,
Are you using WordPress SEO by Yoast?
If so, this thread may be helpful: http://www.generatepress.com/forums/topic/many-breadcrumbs/
Let me know π
September 11, 2015 at 10:48 pm #136162SteveHi Tom,
Thanks for the reply. That thread was very helpful.
A further question. How do I get the breadcrumbs to appear directly after my h1 instead of being way up underneath my header? Is there a special code I need to input for that? The spacing it creates seems to be a bit large too. Is there any way to edit that?
It also appears on my homepage. How can I disable the breadcrumbs on certain pages?
Thanks Tom!
September 11, 2015 at 11:01 pm #136167TomLead DeveloperLead DeveloperHi Steve,
You could place the code in the “After Entry Title” hook in GP Hooks.
To make it display on certain pages, you would have to use WordPress conditionals.
For example, this would show on all pages except the homepage:
<?php if ( ! is_front_page() ) : ?> Stuff in here <?php endif; ?>
Then you would have to check the “Execute PHP” checkbox.
Let me know if you need more info π
September 11, 2015 at 11:26 pm #136168SteveThanks so much, Tom!
My home page is similar to a blog roll and it’s still showing up on the excerpts of each post. Is this something special I should put on there to get them out of these excerpts?
September 11, 2015 at 11:58 pm #136170TomLead DeveloperLead DeveloperTry applying them only to pages and single posts:
<?php if ( is_page() || is_single() ) : ?> Stuff in here <?php endif; ?>
September 12, 2015 at 12:26 am #136172SteveThat did take it off of the excerpts, but it looks like it removed a little bit of the spacing that was on there before. Before the spacing around the crumbs was pretty big and now it is directly under the h1 with almost no padding. Is there a way that I can adjust the spacing?
This also causes it to appear on a few of my opt in pages that I have the disable elements add on working on.
I think if you ever decide to include bread crumbs as a future add on, a good feature to include in it would be to incorporate its functionality with the spacing and disable elements add ons. That way you could adjust its spacing under or above certain elements, and completely remove it from some pages if you wish.
September 12, 2015 at 9:31 am #136286TomLead DeveloperLead DeveloperI agree – it would definitely be added to the Disable Elements add-on.
Do this:
<?php if ( is_page() || is_single() ) : ?> <div class="site-breadcrumbs"> Stuff in here </div> <?php endif; ?>
Then add this CSS:
.site-breadcrumbs { padding: 20px 0; }
Then you can hide them on certain pages by using the page ID of that page. For example, if the page ID is 10, you would do this:
.page-id-10 .site-breadcrumbs { display: none; }
September 12, 2015 at 11:33 am #136305SteveThat worked! Thanks Tom! :]
September 12, 2015 at 5:38 pm #136362TomLead DeveloperLead DeveloperYou’re welcome π
January 22, 2019 at 1:17 pm #789384AridaneHello Tom,
I am trying to add the BreadCrums to my blog but I have tried it in several ways and I have not succeeded, I created a new element Hook where I added the code that I found here but it was not possible for me.
Should I create another type of element? Could you show me here the Yoast code that needs to be included?
January 22, 2019 at 1:38 pm #789401LeoStaffCustomer SupportHi Aridane,
Can you open a new topic for your question?
This one is from 2015.
Thanks!
-
AuthorPosts
- The topic ‘Enables Breadcrumbs on Generate Press’ is closed to new replies.