• 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

How to Make a Hook ONLY Work on a Full Blog Post

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 › General Discussion › How to Make a Hook ONLY Work on a Full Blog Post

This topic is: not resolved

Tagged: conditional tag, genesis hooks, is_singular

  • This topic has 3 replies, 2 voices, and was last updated 9 years, 5 months ago by Brad Dalton.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • October 4, 2016 at 10:03 pm #194245
    CornerstoneKat
    Participant

    Using Genesis Hooks to display a disclaimer via the genesis_entry_header Hook. Is there a way to make that disclaimer ONLY appear in that spot on a full content page and NOT an excerpts page?

    http://cornerstoneconfessions.com/blog
    October 5, 2016 at 2:36 am #194248
    Brad Dalton
    Participant

    For single pages and posts use

    is_singular()
    

    Tutorials for StudioPress Themes.

    October 5, 2016 at 11:29 am #194269
    CornerstoneKat
    Participant

    Here is the code I am currently using:

    <?php if ( is_single() ) {?> <div align="left" style="width:100%; padding:0x; background: #ffffff;"> <span style="font-size: 14px;">Disclaimer: This post may contain advertising or affiliate links. For more info please see my disclosure policy.</span> </div> <?php }?></br>

    How do I need to change it?

    October 6, 2016 at 2:36 am #194285
    Brad Dalton
    Participant

    Hi

    I did link to an example on the Codex. You can add that code to your functions file and change the hook position

    No need for simple hooks


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘General Discussion’ 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

© 2026 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