• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Genesis simple hooks content after posts

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Genesis simple hooks content after posts

This topic is: not resolved

Tagged: random ads, Simple Hooks

  • This topic has 3 replies, 3 voices, and was last updated 7 years, 10 months ago by worldviewpr.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • May 13, 2014 at 2:34 pm #104966
    hich
    Member

    Hi,

    I need to insert a disclaimer message that will appear after post content. The problem is that I know how to insert a piece of code using genesis hooks but I don't know how to filter so it appears only on posts and not on pages. Can someone guide me?

    Thank you,

    May 13, 2014 at 3:20 pm #104972
    hich
    Member

    I found this link:http://www.ericamuelleronline.com/5834/how-to-add-code-to-the-end-of-your-wordpress-posts-using-simple-hooks/
    It seems that it's exactly what I needed. It should only shows on posts, and only when the post is opened (not on the front page or archive pages)
    I added this piece of code:
    <?php if ( is_single() ) { ?>
    <div class="disclaimer">The views expressed here are the writer's own and do not necessarily reflect those...... </div>
    < ?php } ?>
    And enabled execute php in this hook, the problem I'm getting Parse error: syntax error, unexpected $end in message. Please if someone can help?

    May 13, 2014 at 9:00 pm #105036
    Lauren @ OnceCoupled
    Member

    There's a space between the < and ? in your last line. Remove that and see what happens.

    Best,
    Lauren


    We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com

    June 29, 2014 at 6:30 am #111684
    worldviewpr
    Member
    This reply has been marked as private.
  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2022 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble