• 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 Custom Template that does not execute genesis_entry_footer ?

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 › How to make a Custom Template that does not execute genesis_entry_footer ?

This topic is: not resolved
  • This topic has 1 reply, 2 voices, and was last updated 8 years, 4 months ago by Brad Dalton.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • January 5, 2017 at 12:10 pm #198799
    Mane60
    Member

    Genesis Simple Hooks executes on all pages.

    I'd like to make a new page template so that a Genesis Simple Hook that's being executed everywhere else on a site is not used on pages using the new template.
    On most pages, I'd like to show adsense ads at the page top and bottom. The adsense code can be placed using two of the Genesis Simple Hooks:

    genesis_entry_header
    genesis_entry_footer

    What I'd like to do is to add code, say to functions.php, that will prevent the genesis_entry_footer hook being executed on a particular custom template so adsense ads are not shown at the bottom of pages using that template.

    Does anyone know the code I need to add?

    Thanks

    January 5, 2017 at 12:24 pm #198800
    Brad Dalton
    Participant

    Use a basic custom function with hook and conditional tag that excludes the template using the NOT operator !.

    Something like:

    if ( ! is_page_template( 'page_landing.php' )  )
    

    or

    if ( is_page_template( 'page_landing.php' )  )
        return;
    

    Another option is to remove the default after post widget from the template using remove_action directly in the template or the above method which uses a custom function in functions.php

    Something like:

    remove_action( 'genesis_after_entry', 'genesis_after_entry_widget_area' );

    The after entry widget only executes on single posts and pages.


    Tutorials for StudioPress Themes.

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