- This topic has 13 replies, 3 voices, and was last updated 3 years, 3 months ago by
Fernando.
-
AuthorPosts
-
January 24, 2023 at 1:50 pm #2507823
Matt Stern
Hi Guys,
Long time no see. 😉
I’m trying to reconstruct a sidebar layout similar to the following pages:
My goal is to have the “About the Author” section to the right of the title inside the tan hero section, and have the “Related Posts” section show at the bottom right of the post content itself.
I’ve begun by creating a page hero element and a sidebar element, but not sure how to take it from here.
Demo: https://sternstaging2.com/2023/01/24/the-surprising-ways-that-sleep-affects-your-metabolism/
Any suggestions on the best way to do this? I wonder if it might be easier to add the Author Bio to the page hero element itself, though this might lead to alignment issues with the actual sidebar.
Then perhaps for the Related Articles some css could bring it to the bottom of its container?
Thanks in advance!
Matt
January 24, 2023 at 1:55 pm #2507826Matt Stern
Alternatively, perhaps the Related Posts section could be its own hooked element? Then the sidebar is technically empty, though the content appears to be in the sidebar.
January 24, 2023 at 6:21 pm #2507975Ying
StaffCustomer SupportHi Matt,
My goal is to have the “About the Author” section to the right of the title inside the tan hero section
Try change the page hero’s hook name from
after_headertobefore_main_content.and have the “Related Posts” section show at the bottom right of the post content itself.
Try adding this CSS:
.single-post .is-right-sidebar .gb-container.related-posts > .gb-inside-container { display: flex; flex-direction: column; justify-content: space-between; } .single-post .is-right-sidebar .gb-container.related-posts > .gb-inside-container > *:last-child { margin-top: auto; } .single-post .inside-right-sidebar, .related-posts, .related-posts > .gb-inside-container { height: 100%; }January 24, 2023 at 6:40 pm #2507982Matt Stern
Thanks Ying,
The css for the related posts worked great.
Switching the hook for the page hero caused some problems: https://sternstaging2.com/2023/01/24/the-surprising-ways-that-sleep-affects-your-metabolism/
I should have clarified that this is the look I’m going for in the hero section: Link
I also tried the before_content hook and that didn’t change much.
Let me know if you have ideas.
January 24, 2023 at 6:43 pm #2507986Ying
StaffCustomer Support1. Do not use the header element to merge the site content with the header.
2. It’s better to save the background as an image or SVG, then apply it as the body background.
January 24, 2023 at 6:48 pm #2507990Matt Stern
1. That worked.
2. You mean, instead of the shape divider and background color? What about making the background go across so it covers the Author bio section?
January 24, 2023 at 7:08 pm #2507998Ying
StaffCustomer Support2. You mean, instead of the shape divider and background color?
Yes, in your design, there are also some pattern in the background, so why not combine the background color and the patterns to be 1 image?
What about making the background go across so it covers the Author bio section?
That’s how the body background image work.
January 24, 2023 at 7:33 pm #2508009Matt Stern
I’m not quite seeing how it will work, but will play around with it and see. Is the body background image set in customizer, or is this a different hook?
January 24, 2023 at 7:36 pm #2508011Ying
StaffCustomer Support. Is the body background image set in customizer, or is this a different hook?
Yes, there’s a premium module called background.
But the module add background sitewide, can’t really select it only for posts.
So I think using CSS would be better if you don’t want the background image to show everywhere.
January 24, 2023 at 7:42 pm #2508013Ying
StaffCustomer SupportJust got another idea, you can use a block element with background color and shape, set a min-height, then insert it
before_header.And then we can use CSS to make it
position:absolute;and stick to the top.January 24, 2023 at 10:13 pm #2508077Matt Stern
ok, that’s done. I tried
position:absolute;in the inspector and it just disappears. What am I missing?https://sternstaging2.com/2023/01/24/the-surprising-ways-that-sleep-affects-your-metabolism/
January 24, 2023 at 10:20 pm #2508079Fernando Customer Support
Hi Matt,
Can you try adding this code?:
.gb-container.hero-shape { position:absolute; top:0; left:0; z-index: 0; width: 100%; } header.site-header, nav#site-navigation { background-color:transparent; }January 31, 2023 at 11:00 pm #2516582Matt Stern
Thanks Guys! This is looking really good. I’ll play around with this and see how it goes. 🙂
Closing the ticket.
February 1, 2023 at 1:14 am #2516672Fernando Customer Support
You’re welcome, Matt!
-
AuthorPosts
- You must be logged in to reply to this topic.