[Resolved] Add Custom Navigation to Posts (Single)

Home Forums Support [Resolved] Add Custom Navigation to Posts (Single)

Home Forums Support Add Custom Navigation to Posts (Single)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1474439
    Christopher

    Hi, all.

    I’ve got a small website where we post newsletters about once a quarter. What I’d like to do is add a custom navigation at the bottom of the post, where it takes people back to the home page. I have no need for “previous” or “next” posts…just a simple “return to home” link.

    I’ve seen code snippets and have been successful with getting “previous” links on there, but I am not versed in editing that function / add_filter code snippet, to get back to the home page.

    Any help would be greatly appreciated. Thank you!

    edit: wording

    #1474522
    David
    Staff
    Customer Support

    Hi there,

    you can use the Hook Element:

    https://docs.generatepress.com/article/hooks-element-overview/

    Create a new Hook in Appearance > Elements.
    Add your HTML for the link in the content:

    <a href="your-home-page-url">Return to home</a>

    Select the generate_after_content hook
    Set the Display rules to Posts > All Posts.

    You can also do this with the Block Element if you want to use blocks instead of HTML:

    https://docs.generatepress.com/article/block-element-overview/

    #1475192
    Christopher

    Thank you! Amazing.

    #1475482
    David
    Staff
    Customer Support

    Glad to be of help

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