• 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

Add Hooks only to 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 › Design Tips and Tricks › Add Hooks only to Post

This topic is: not resolved

Tagged: archive template, custom archive, genesis hooks

  • This topic has 4 replies, 2 voices, and was last updated 7 years, 1 month ago by GokulDeepak.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • May 5, 2018 at 3:54 am #219553
    GokulDeepak
    Member

    I have added <?php echo "Movie"; ?> content using Genesis Hook Plugin.
    Added in" Before Entry content".
    I wanted to show Movie only in Post.
    But Now "Movie" is shown also in Pages.
    Also, I'm using Custom Archive Page. There too the term Movie is added in the loop.

    Moto: echo "Movie" only in Post and not in pages and Archives.
    Please help me Thanks in advance.

    https://www.tamilsongslyrics.com
    May 5, 2018 at 5:25 am #219555
    Brad Dalton
    Participant

    See the example on this page

    Custom archive templates are loaded using the WordPress Template Hierarchy so you can target specific archives like this category-news.php. In this case, the template only loads on the news category.


    Tutorials for StudioPress Themes.

    May 5, 2018 at 10:59 am #219559
    GokulDeepak
    Member

    Sorry. Is there a way to display hook only in post but not on pages?

    May 6, 2018 at 3:15 am #219566
    Brad Dalton
    Participant

    Use a conditional tag like

    is_singular('post')

    Tutorials for StudioPress Themes.

    May 7, 2018 at 8:56 pm #219626
    GokulDeepak
    Member

    This is what I want. Thank you so much.

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

© 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