[Resolved] Auto Disclaimer message

Home Forums Support [Resolved] Auto Disclaimer message

Home Forums Support Auto Disclaimer message

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #648562
    Rachel

    Hi, I would like to automatically include a short disclaimer message under the title of my posts and also pages (if possible).

    I don’t want this message to be included in the excerpt or be treated as part of the content. I would prefer it to be lightly coloured and hyperlinked to the disclaimer page. Is there a way to include it as a meta tag for the post / page?

    Example: “this page may contain compensated links. For more information read our disclaimer here.”

    Is there a way to do this?
    Thanks.

    #648586
    Tom
    Lead Developer
    Lead Developer

    Hi Rachel,

    You can hook it into your pages uses a Hook element: https://docs.generatepress.com/article/hooks-element-overview/

    For example:

    <div class="notice">
        This page may contain compensated links. For more information read our disclaimer <a href="URL HERE">here</a>.
    </div>
    #648599
    Rachel

    So if placed the code in the generate_after_entry_title hook would it display under the post title and page title or do I need to put it in two hooks? Also, will it be picked up in the excerpt?

    #648630
    Tom
    Lead Developer
    Lead Developer

    It should display in both areas.

    It will only display above the excerpt (below the title) if you choose to display on the blog/archives within the Display Rules.

    #648688
    Rachel

    Ok thanks. If I want the text to adopt the same font as the other meta information, how would I do that?

    #649419
    Tom
    Lead Developer
    Lead Developer

    Try giving it this class:

    <div class="notice entry-meta">

    #649924
    Rachel

    Works perfectly. Thanks so much for your help. Loving this theme and the support!

    #649950
    Tom
    Lead Developer
    Lead Developer

    You’re welcome!

    Glad you’re enoying GP! 🙂

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