[Resolved] Sections and All in One Schema.org Rich Snippets + Comments

Home Forums Support Sections and All in One Schema.org Rich Snippets + Comments

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1064645
    authorityrocket

    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?
    Thanks

    #1064679
    David
    Staff
    Customer Support

    Hi there,

    I am not familiar with the AIO Rich Snippets – how is that content added ? Is it also a shortcode?

    #1064688
    authorityrocket

    Hi 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

    #1064690
    David
    Staff
    Customer Support

    Aah 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.

    #1064695
    authorityrocket

    Ok thank you.
    I will try this first thing in the morning

    #1064699
    David
    Staff
    Customer Support
    #1065134
    authorityrocket

    Hi 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

    #1065164
    David
    Staff
    Customer Support

    Sections 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

    #1065166
    authorityrocket

    Oh, 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.

    #1065168
    David
    Staff
    Customer Support

    For 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/

    #1065175
    authorityrocket

    Thanks 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

    #1065178
    authorityrocket

    I got the comments working following the suggestions here – https://generatepress.com/forums/topic/comments-using-sections/#post-325331

    Thanks again David.

    #1065180
    David
    Staff
    Customer Support
Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.