[Resolved] Hook showing on homepage page as well

Home Forums Support [Resolved] Hook showing on homepage page as well

Home Forums Support Hook showing on homepage page as well

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #637204
    Chris

    Hi, sorry if this is a noob question but this is my first time working with hooks.

    I want to add an optin after my blog content. But when I add the shortcode for the optin form to the “After Content” box in the Hooks section it’s also added to every blog excerpt on the homepage.

    What setting or step am I missing?

    Note: I don’t have the hook active on my blog right now

    #637207
    David
    Staff
    Customer Support

    Hi Chris,

    each of the blog posts is an article with its own content, hence why it appears there.
    In the current hooks you can wrap your shortcode in some PHP like so:

    <?php if ( is_single() ) : ?>
        YOUR SHORTCODE IN HERE
    <?php endif; ?>

    And check the Execute PHP box.

    GP 1.7 is about to release which will make this really simple. Release candidate can be downloaded if you’re interested.

    #637214
    Chris

    Wow this support is amazing, thanks David, works like a charm!

    #637222
    David
    Staff
    Customer Support

    Glad to hear I could help. 🙂

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