• 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

Prevent Simple Hooks from Showing on Pages

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 › Prevent Simple Hooks from Showing on Pages

This topic is: not resolved

Tagged: Simple Hooks

  • This topic has 6 replies, 2 voices, and was last updated 6 years, 8 months ago by sportydave.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • September 22, 2015 at 4:34 am #166314
    sportydave
    Participant

    HI, I've installed Simple Hooks so I can put a call to action in straight after every post.

    How can I prevent the hook from showing on pages?
    How can I get a hook to appear before the WordPress related posts area?

    I also notice it appears after every excerpt on the blog page!

    Simple Hook Positions


    Kind Regards,
    David Trounce

    http://www.malleeblue.com/deceptive-web-marketing-that-ruins-user-trust/
    September 22, 2015 at 4:52 am #166317
    Brad Dalton
    Participant

    Use:

    if ( is_singular('post'))
    

    You'll find a after post widget already built into Genesis for this so all you need to do is add one line of PHP to your functions file.


    2700 Genesis Tutorials

    September 22, 2015 at 5:30 am #166320
    sportydave
    Participant

    Thanks Brad,

    My Genesis Theme (Epik) doesn't have an after post widget (at least, I can't see one in the widget page), which is why I turned to the Simple Hooks.

    I will keep working on a solution. It would be ideal if the Simple Hooks could do it as its an otherwise very useful plugin.


    Kind Regards,
    David Trounce

    September 22, 2015 at 7:28 am #166336
    Brad Dalton
    Participant

    Genesis already includes an after post widget i linked to above.


    2700 Genesis Tutorials

    September 22, 2015 at 7:43 am #166337
    sportydave
    Participant

    My apologies, I wasn't paying enough attention. I looked at the link, thought, "That's not a plugin", went to my widget dashboard, couldn't see such a widget there......

    Thanks for the code. I will use it..... but, the Hook plugin does not have an "after_post_content hook" that's mentioned inthe link you gave me.


    Kind Regards,
    David Trounce

    September 22, 2015 at 7:44 am #166338
    Brad Dalton
    Participant

    Its only 1 small line of PHP so no need for the simple hooks plugin.


    2700 Genesis Tutorials

    September 22, 2015 at 7:56 am #166342
    sportydave
    Participant

    OK, gotcha. It goes in my fucntions.php adn the widget should then appear. Thanks Brad.


    Kind Regards,
    David Trounce

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 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