• 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

double widget entry for widget area after posts (in single posts only)

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 › double widget entry for widget area after posts (in single posts only)

This topic is: not resolved

Tagged: after-entry widget area

  • This topic has 4 replies, 2 voices, and was last updated 10 years, 1 month ago by Marcy.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • September 30, 2015 at 5:13 am #167013
    Bill
    Participant

    I created a widget area to display after posts, pages, and two custom post types. I display a banner. IT works fine in pages, and both custom post types, but it shows as a double entry in my blog single posts. Anyone see what I did wrong and offer a solution? Thanks for any help offered!

    Here is the issue
    In single posts, I get a a double widget entry.
    works fine on single pages
    works fine on single cpt's
    If I change singular to single though, posts display correctly, but the pages and CPT's dont show any widget area.

    // Add after entry widget to posts and pages
    add_action( 'genesis_after_entry', 'mcq_after_entry', 9 );
    function mcq_after_entry() {

    if ( ! is_singular( array( 'post', 'page', 'condominiums', 'neighborhoods' )) )
    return;

    genesis_widget_area( 'after-entry', array(
    'before' => '<div class="after-entry widget-area">',
    'after' => '</div>',
    ) );

    }

    September 30, 2015 at 2:54 pm #167081
    Marcy
    Participant

    You need to remove the original after entry widget area from the blog post pages.
    Try this in functions.php before your code above:

    
    //* Relocate after entry widget
    remove_action( 'genesis_after_entry', 'genesis_after_entry_widget_area' );

    Marcy | Amethyst Website Design | Twitter

    October 1, 2015 at 10:07 am #167151
    Bill
    Participant

    I am sorry Marcy,
    I neglected to include that code. I actually did that!

    October 1, 2015 at 10:18 am #167154
    Bill
    Participant

    Never mind Marcy, I found the issue. Thank you.

    October 1, 2015 at 1:22 pm #167169
    Marcy
    Participant

    OK, I'm glad you got it figured out!


    Marcy | Amethyst Website Design | Twitter

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