• 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

Register Widget for Ads right after Post Entry Meta area?

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 › Register Widget for Ads right after Post Entry Meta area?

This topic is: not resolved

Tagged: display widget before, Registering widget after the Entry Meta items

  • This topic has 1 reply, 2 voices, and was last updated 9 years, 7 months ago by Brad Dalton.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • November 30, 2015 at 1:41 pm #172280
    StacyN
    Participant

    I managed to successfully register a widget that I wish to appear beneath post titles so my client can insert Google Adsense code for ads to display before each blog post.

    I added this code to my functions.php file:

    /** Register below Post title widget for ads */

    genesis_register_sidebar( array(
    'id' => 'below-post-title',
    'name' => __( 'Below Post Title', 'bitdoz' ),
    'description' => __( 'This is the below post title widget.', 'bitdoz' ),
    ) );

    /** Add the below post title widget for ads */
    add_action( 'genesis_entry_header', 'below_post_title' );
    function below_post_title() {

    if ( is_single() )
    {
    genesis_widget_area( 'below-post-title', array(
    'before' => '<div class="below-post-title-widget-area">',
    ) );

    I'm dangerously close to having this show where I want it to display - but he wants it UNDER the Date / Author data - not between the Post Title and the entry data. I've tried all day to locate the right hook for this, and can't seem to find the spot.

    We want this:
    POST TITLE
    Entry Meta
    Widget for Adsense code

    But for right now, it is displaying as:
    POST TITLE
    Widget for Adsense code
    Entry Meta

    Should it be something like 'below_entry_meta' instead of 'below-post-title' ?

    I've tried looking here: http://genesistutorials.com/visual-hook-guide/ - I just don't see what I'm looking for?

    Thank you in advance

    http://978.fb1.myftpupload.com/2015/11/fake-article-3-for-website-sample/
    November 30, 2015 at 7:57 pm #172308
    Brad Dalton
    Participant

    Try a 3rd parameter of 15 with the genesis_entry_header hook

    Or

    Try a 3rd paramater of 5 with the genesis_entry_content hook

    Something like one of these:

    add_action( 'genesis_entry_header', 'below_post_title, 15' );
    add_action( 'genesis_entry_content', 'below_post_title, 5' );
    

    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