- This topic has 12 replies, 2 voices, and was last updated 4 years, 5 months ago by David.
-
AuthorPosts
-
November 16, 2019 at 2:07 am #1064645authorityrocket
Hi team.
I must say I do love GeneratePress, it’s an amazing theme.With that said, I’ve been using sections lately and I’m wanting to set up a few different post templates, then just duplicate the ones I want using a plugin like wp duplicate post to save time.
Here’s my problem…
I have 2 sections for a post where I want to write a review. The top section is full width but contained in the section settings, the second section is as default and where the bulk of my content will go.I have TOC (table of contents plugin) and All in One Schema.org Rich Snippets. Each of those breaks the page and align to the left outside the content wrap. Comments are also not showing for posts I use sections.
I managed to put the TOC shortcode in a section on its own but rich snippets and comments I can’t work out.
Has anyone else had this problem and what can I do to fix it?
ThanksNovember 16, 2019 at 3:43 am #1064679DavidStaffCustomer SupportHi there,
I am not familiar with the AIO Rich Snippets – how is that content added ? Is it also a shortcode?
November 16, 2019 at 4:07 am #1064688authorityrocketHi David.
The plugin automatically adds it in at the footer.
Seems like anything after the content of Sections it goes weird with all plugins and comments
Thanks
November 16, 2019 at 4:19 am #1064690DavidStaffCustomer SupportAah ok so the container is full width to accommodate sections. So anything outside of a section will do that.
So outward of hooking the content into the page within a grid-container wrapper you can add some auto margins to the code like so:#snippet-box { margin: auto; box-sizing: border-box; } #snippet-box * { box-sizing: inherit; }
I also added box-sizing properties ( which the plugin author should do ) to fix the content alignment issues.
November 16, 2019 at 4:30 am #1064695authorityrocketOk thank you.
I will try this first thing in the morningNovember 16, 2019 at 4:38 am #1064699DavidStaffCustomer SupportLet us know 🙂
November 16, 2019 at 3:06 pm #1065134authorityrocketHi David,
That seemed to work fine.However, my comment section is still showing which is strange.
Any idea why comments work on normal posts and not when using Sections?Thanks
November 16, 2019 at 4:28 pm #1065164DavidStaffCustomer SupportSections were never designed to be used on Posts, more as a simple page builder for landing pages and the like, so things like Comments are not available.
This topic here explains how one user got around it.
https://generatepress.com/forums/topic/comments-using-sections/#post-325331
November 16, 2019 at 4:40 pm #1065166authorityrocketOh, ok. I didn’t know that. Wish I did though because the templates I have in mind will need sections so I can have a full-width header like section at the top of each post.
I will take a look and see if I can do the workaround.
Thanks anyway, you’ve been super helpful.
November 16, 2019 at 4:53 pm #1065168DavidStaffCustomer SupportFor full width headers with dynamic content you can use the Header Element:
https://docs.generatepress.com/article/header-element-overview/
And theres also the Hook Element which would allow you to insert content in other parts of the theme templates:
https://docs.generatepress.com/article/hooks-element-overview/
November 16, 2019 at 5:06 pm #1065175authorityrocketThanks David.
I will look into it. I have been using Headers but more for static pages. I’ve found using sections is just a lot easier and I can simply duplicate my template using duplicate post plugin.Cheers
November 16, 2019 at 5:16 pm #1065178authorityrocketI got the comments working following the suggestions here – https://generatepress.com/forums/topic/comments-using-sections/#post-325331
Thanks again David.
November 16, 2019 at 5:17 pm #1065180DavidStaffCustomer SupportGlad to be of help
-
AuthorPosts
- You must be logged in to reply to this topic.