- This topic has 13 replies, 2 voices, and was last updated 7 years, 10 months ago by Tom.
-
AuthorPosts
-
June 12, 2016 at 7:50 am #201283David
Hi Tom – I’m having a heck of a time figuring out what’s going on with my Posts Page (http://2011disaster.jcie.org/recoveryjournal/). It is showing content header, but I had deleted it from the Page Header > Content Settings on its Page Admin.
There are two other items I can’t quite figure out:
1) Reducing space between header content and posts/ sidebar (tried all types of ccs to override)
2) Add breadcrumbs to this page.Thanks!
June 12, 2016 at 8:13 am #201287DavidUpdate: I was able to close the gap between the header content and the posts archive, but I still am not sure where the page header content is coming from. I had deleted it a while ago.
June 12, 2016 at 8:19 am #201289DavidScratch that. It was a cache left over from using Chrome’s Developer tools. Gap between header content and posts is still there.
June 12, 2016 at 10:14 am #201319TomLead DeveloperLead DeveloperYou have the full screen option set in the Content settings in Page Header.
If you disable full screen it will go away 🙂
June 12, 2016 at 5:15 pm #201372DavidAwesome and thank you. When I updated GeneratePress Page Header moved to the Customizer and that threw me off as well. Gap issue is fixed and I also see where I can edit my content again.
June 12, 2016 at 5:40 pm #201378DavidLast item – how would I go about showing breadcrumbs on the Posts Page and also on the tag archives such as: http://2011disaster.jcie.org/fund-updatetag/aar-japan/. Breadcrumbs through Yoast is working elsewhere correctly. Thanks in advance!
June 13, 2016 at 12:39 am #201440TomLead DeveloperLead DeveloperWhat code are you currently using the display the breadcrumbs?
June 13, 2016 at 9:13 am #201581DavidHi Tom – I have the following GP Hook After Header:
<?php if ( function_exists('yoast_breadcrumb') ) { ?> <?php if ( is_single() ) : ?> <div class="grid-container grid-parent"> <div class="page-header"> <?php yoast_breadcrumb('<p id="breadcrumbs">','</p>'); ?> </div> </div> <?php endif; ?> <?php } ?>
- This reply was modified 7 years, 10 months ago by Tom.
June 13, 2016 at 9:17 am #201587TomLead DeveloperLead Developeris_single() makes it so it will only show on single posts.
So you want this instead:
<?php if ( function_exists('yoast_breadcrumb') ) { ?> <div class="grid-container grid-parent gp-breadcrumbs"> <div class="page-header"> <?php yoast_breadcrumb('<p id="breadcrumbs">','</p>'); ?> </div> </div> <?php } ?>
- This reply was modified 7 years, 10 months ago by Tom.
June 13, 2016 at 9:26 am #201588DavidOK so that works, but then the breadcrumbs are now showing up on pages that I don’t want them too such as the home page (Page ID = 2). I was trying to use this CSS to hide them:
.page-id-2 .site-breadcrumbs { display: none; }
June 13, 2016 at 9:33 am #201590DavidHi Tom – I updated from “.site-breadcrumbs” to “#breadcrumbs”. Back to working, I just need to get rid of the spacing now on the pages where breadcrumbs are being hidden. For instance on the home page the main image should be flush up against the menu: http://2011disaster.jcie.org/
Thank you for the help (and quick replies at that)!
June 13, 2016 at 9:35 am #201592TomLead DeveloperLead DeveloperI adjusted the PHP above.
Now use this CSS to hide them:
.gp-breadcrumbs { display: none; }
June 13, 2016 at 9:41 am #201594DavidBrilliant. Thank you. That’s a much easier solution than hard coding the css for each page where breadcrumbs shouldn’t be.
June 13, 2016 at 9:43 am #201596TomLead DeveloperLead DeveloperYou’ll still need to do that, the CSS above will remove it on all pages.
However, you can use our Simple CSS plugin which adds a CSS metabox on each page, so you can just pop that code in there instead of finding IDs and adding a bunch of them: https://wordpress.org/plugins/simple-css/
-
AuthorPosts
- You must be logged in to reply to this topic.