Reader Interactions


  1. Hi Lauren,
    Installed this morning using simple hooks. Worked great!
    How do I center the txt?
    Also can the same method be used to center my post title/header?
    Do you recommend this or just a matter of style.
    Thanks so much for the blog updates. They are really helpful.

    • Hey, Quinn! If you add class=”disclosure” to the “p” tag, you can use the following code:

      .disclosure { text-align: center; }

      To also center your title (in posts only), use:

      .single .content .entry-title, .disclosure { text-align: center; }

  2. Hi Lauren,
    How do I remove the disclaimer on a single post? There is not a section for post exclusions I can find in simple hooks. Do I just a code to the post itself??

    • If you only want it to appear on a post that’s assigned to a specific category, you can change if ( is_singular( 'post' ) ) to if ( is_singular( 'post' ) && has_category ( 'put-category-slug-here' ) ). There are some other ways to remove from a specific post, but they’re not as intuitive. For instance, you could exclude that post id from this conditional, or you could add styles to this page only and hide the disclaimer.

  3. HI! So I tried this, and I some how made my user name and other info next to the date all wonky. Although I will say that the affiliate disclosure looked great. Ha.

    Anyway I reset all the settings, but it still looks wonky. Any advice how I can get it to go back to normal?

    • Hey, Stormy! I’m looking at your site now and I’m seeing the disclaimer without any date information. Does that mean you were able to fix it? 🙂 If not, can you tell me more about (a) what’s happening and (b) what you expect to happen? For instance, I’m not sure where your date information used to be or what makes it look wonky. Let me know if I can help!

  4. Hi, Lauren. This is awesome. Thank you. Now that I have my disclosure up, it is either showing up on all posts, but all pages, too. I’m switching it to just one category, but how do you only display on categories vs pages like about me?
    Thanks so much!

  5. Lauren, this was so helpful – thank you! Quick question though – ever since adding the disclosure, I’ve noticed that Facebook now automatically picks up on that part to show under any post that is shared (so the “preview” is always the disclosure statement). Is there a way around this, besides manually inputting a snippet through Yoast or another plugin? Like maybe a way to exclude the disclosure text from being included in snippets with code? Thanks!

    • Hmm, when using the Facebook debugger I’m not seeing this; your description should be pulled directly from your post. That said, we can probably avoid potential errors by changing the location of the disclaimer slightly.

      Which method are you using to insert your disclosure? You might try a different hook, so that isn’t considered part of the post content.

      For instance: change ‘genesis_entry_content’ to ‘genesis_before_entry_content’ or even ‘genesis_entry_header’ (and change the ‘priority’ at the end to 11 or higher).

      Note that this will move to location of your snippet above the share buttons.

  6. So you’ll want to change add_action( 'genesis_entry_content', 'oc_snippet_do_disclosure', 1 ); to add_action( 'genesis_entry_header', 'oc_snippet_do_disclosure' );. Let me know if that works!

  7. THANK YOU!!! I love this! I have one question though, I would like to make it smaller than my paragraph text and possibly italic (oh no…I feel like one of those people who comment on my recipes saying I love this ham and cheese quiche but I’m allergic to egg, can’t eat gluten and am dairy intolerant…how could I modify this).

    Would I do this using CSS? Thanks again so much!

    • LOL, Kylie, you’re good! Looking at your site, you’ll need to add some kind of class to that paragraph, so the HTML looks like this:

      [p class="disclosure"]Disclosure: This post may contain affiliate links. I receive a small commission at no cost to you when you make a purchase using my link.[/p]

      (Swap the square brackets for angles.) Then you could have the following CSS:

      .disclosure { font-style: italic; font-size: 14px; font-size: 1.4rem; }

  8. Thank you, Lauren! I have been looking to do this for a while. I made a few changes to the style, using a post template and grabbing the html code 🙂

    I appreciate your effort in writing such a detailed tutorial!

  9. Thank you for making this tutorial! I did have a moment of ‘this seems way too complicated’ but then I did it and it was simple. 🙂 Now I have a disclosure at the top of my posts and I added a link from that to my full disclosure along with playing with the formatting a bit to make it the way I wanted it.

    • Hey, Bobbi, it sounds like you’ve got an extra “}” at the end – can you delete one and see if that resolves? Are you adding this code to a section with other code that already exists? If you can share you code or add an image, that can help me debug. 🙂

      • Yes, that could be the problem.  I am trying to add a second disclaimer.  The first is for a different category and shows perfectly.

        < ?php if ( is_singular( 'post' ) && has_category ( 'fitness' ) ) { ?>

        Disclaimer: Always keep in mind that these are techniques and exercises I have used in my own training programs as well as those of my clients. What is right for us, may not be right for you depending on your health history! Always consult with a certified professional or doctor before jumping into a new type of program. You know your body best so don’t forget to show it some love by taking care of it ?

        < ?php } ?>

        < ?php if ( is_singular( 'post' ) && has_category ( array ('breakfast', 'main-meals', 'smoothies', 'desserts', 'healthyeats', 'snacks') ) ) { ?>

        Disclaimer: While I adore nutrient filled and quality filled superfoods and supplements, please understand that they’re not for everyone! I include these items into my normal diet because they work for me. However, if you have a specific aliment (like kidney stones, autoimmune disease etc) please check with a doctor and do your own research before adding anything into your diet. While real food is normally a safe bet, sometimes even too much of specific foods can cause problems. Stay safe & healthy mamas

        < ?php } ?>

        • The formatting doesn’t really transfer well via comment, unfortunately, but the code looks right. I’d have to guess there’s something else going on – whether that means a character is being read incorrectly or a different error is being brought to light, it’s difficult to say. :/

  10. This is SO helpful, thank you! Is it possible to EXCLUDE the hook from a certain category? For example, my sponsored posts require a different disclosure than my affiliate link posts, so for that category, I would like to remove the affiliate disclosure. Is there an easy way to do that? Thank you so much for the help!

  11. Do you know how to disable the hook on certain posts, like sponsored posts. I’ve had some brands not like it being there, but I can’t figure out how to disable it for one post. 😭

    • Hey, Samantha, there’s no way to do that from the post editor, but you could exclude a category/tag, then make sure that’s assigned to the post. So you’d change

      if ( is_singular( 'post' ) ) {


      if ( is_singular( 'post' ) && ! has_tag( 'sponsored' ) ) {

      If you applied this tag to all of your sponsored posts, that would remove the affiliate disclaimer from them (and you could then re-work this code to show a sponsored disclaimer, instead).

      Hope this helps!

  12. OMG THANK YOU SOOOOOO MUCH!!! I spent forever trying to figure this out on my own–and failed. Your code took two seconds and done! So helpful!

Leave a Comment