• 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 hide hooks from archive 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 › General Discussion › How to hide hooks from archive pages

This topic is: not resolved

Tagged: hooks

  • This topic has 2 replies, 2 voices, and was last updated 11 years, 7 months ago by psvj.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • November 30, 2013 at 8:38 pm #76356
    psvj
    Member

    Hello,

    Is there anyway to prevent stuff i add to posts through the use of a hook fro appearing in archive pages?

    Thanks

    November 30, 2013 at 10:09 pm #76368
    nutsandbolts
    Member

    Can you give us an example? Generally you can use WP conditionals to display items only on single posts or everywhere but archives, but it depends on what it is and what function you use.


    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    November 30, 2013 at 11:41 pm #76389
    psvj
    Member

    Thanks Andrea.

    I ended up using this little snippet of code in my theme function.php file--

    /* Filter the_content() */
    add_filter( 'the_content', 'my_content_filter' );

    function my_content_filter( $content ) {
    if ( is_single()) {
    $content .= 'insert content';
    }
    return $content;
    }

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

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