Archived topic
Posts-Page Header
13 replies · Started by David on June 12, 2016
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!
Update: 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.
Scratch that. It was a cache left over from using Chrome's Developer tools. Gap between header content and posts is still there.
You have the full screen option set in the Content settings in Page Header.
If you disable full screen it will go away :)
Awesome 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.
Last 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!
What code are you currently using the display the breadcrumbs?
Hi 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 } ?>
is_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 } ?>
OK 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;
}
Hi 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)!
I adjusted the PHP above.
Now use this CSS to hide them:
.gp-breadcrumbs {
display: none;
}
Brilliant. Thank you. That's a much easier solution than hard coding the css for each page where breadcrumbs shouldn't be.
You'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/
