[Resolved] After Content hook not implemented on pages using Sections?

Home Forums Support [Resolved] After Content hook not implemented on pages using Sections?

Home Forums Support After Content hook not implemented on pages using Sections?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #309651
    Andy

    Hi πŸ™‚

    I’m adding social media share buttons manually by placing a PHP shortcode into the ‘After Content’ hook. The buttons are appearing on ALL pages and posts except the pages that are built using Sections. Is there any way to make the buttons appear on those too?

    Thanks.

    Andy

    #309692
    Tom
    Lead Developer
    Lead Developer

    The problem with inserting things into the pages using Sections is that your element won’t be within a section, which wouldn’t look very good.

    If you’d like to insert your share buttons using a custom container/making a section for it, you can use the generate_after_main_content hook: https://docs.generatepress.com/article/generate_after_main_content/

    Let me know if you need more info πŸ™‚

    #309789
    Andy

    Thanks for the reply, Tom.

    #309861
    Tom
    Lead Developer
    Lead Developer

    No problem πŸ™‚

    #488904
    Sue

    How do you get the custom function to show inside the container? In this case, the client wants the Yoast Breadcrumbs to show below the content. I created the generate_after_main_content hook which works, but it is outside the container.

    Thanks!

    #488923
    Leo
    Staff
    Customer Support

    Are you using Sections? If not please open a new topic. Thanks!

    #488925
    Sue

    Yes, using sections.

    #488987
    Leo
    Staff
    Customer Support

    There isn’t a container with sections.

    You would just need to add to the last section on that page.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.