• 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

Magazine-Pro – After Entry Widget in Custom Post Types

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 › Magazine-Pro – After Entry Widget in Custom Post Types

This topic is: not resolved

Tagged: custom post types, magazine, Magazine Pro, widgets

  • This topic has 6 replies, 2 voices, and was last updated 10 years, 9 months ago by Genesis Developer.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • March 2, 2015 at 6:58 pm #142957
    eluviis
    Member

    Hi, I have a problem where I can't seen to be able to get the After Entry widget to show up in my custom post types. I have a feeling it has something to do with the code below from the Magazine-Pro functions.php, but I can't seem to figure out what to change to make the widget show in my custom post type posts.

    Note: I can see the home footer widgets are in this code. But I see "genesis-after-entry" in the code, so I assume that bit is also wrapped up in this.

    Here's the code I'm looking at:

    //* Remove entry meta in entry footer
    add_action( 'genesis_before_entry', 'magazine_remove_entry_meta' );
    function magazine_remove_entry_meta() {
    	
    	//* Remove if not single post
    	if ( ! is_single() ) {
    		remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );
    		remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
    		remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 );
    	}
    
    }
    //* Add support for 3-column footer widgets
    add_theme_support( 'genesis-footer-widgets', 3 );
    
    //* Add support for after entry widget
    add_theme_support( 'genesis-after-entry-widget-area' );
    
    //* Relocate after entry widget
    remove_action( 'genesis_after_entry', 'genesis_after_entry_widget_area' );
    add_action( 'genesis_entry_footer', 'genesis_after_entry_widget_area' );
    March 3, 2015 at 12:13 am #142980
    Genesis Developer
    Member

    Try this code :

    add_action( 'genesis_entry_footer', 'genesis_after_entry_widget_area_for_cpt', 20 );
    function genesis_after_entry_widget_area_for_cpt() {
    
      if ( in_array( get_post_type(), array( 'post', 'page' ) ) || ! current_theme_supports( 'genesis-after-entry-widget-area' ) ) {
        return;
      }
    
      genesis_widget_area( 'after-entry', array(
        'before' => '<div class="after-entry widget-area">',
        'after'  => '</div>',
      ) );
    
    }

    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    March 3, 2015 at 12:27 am #142985
    eluviis
    Member

    ^^^ In addition to what I already have?

    Man, I have to make sure I jot down your information so that I have someone to hire when I need to debug this thing. You really know your stuff.

    March 3, 2015 at 12:30 am #142986
    eluviis
    Member

    Actually, that didn't quite work. I ended up with the content I looking for, but twice on the posts and still none on the CPTs.

    Hold on... I'm trying to edit it to work...

    March 3, 2015 at 12:36 am #142987
    eluviis
    Member

    Lol, no... I end up with the after_entry widget in many places it should not be. In some pages even twice.

    I tried replacing 'posts','page' with the names of the CPTs 'quickblog','portfolio.' but it still doesn't work right.

    See below:

    add_action( 'genesis_entry_footer', 'genesis_after_entry_widget_area_for_cpt', 20 );
    function genesis_after_entry_widget_area_for_cpt() {
    
      if ( in_array( get_post_type(), array( 'posts','quickblog', 'portfolio' ) ) || ! current_theme_supports( 'genesis-after-entry-widget-area' ) ) {
        return;
      }
    
      genesis_widget_area( 'after-entry', array(
        'before' => '<div class="after-entry widget-area">',
        'after'  => '</div>',
      ) );
    
    }
    March 3, 2015 at 12:39 am #142988
    eluviis
    Member

    I'm going to put this on the backburner until Wednesday. I'll be away tomorrow and I have to wrap up. But I'll be back to see if I can get this one to work. It's pretty important for the overall site.

    March 3, 2015 at 12:42 am #142989
    Genesis Developer
    Member

    Replace this line

    in_array( get_post_type(), array( 'posts','quickblog', 'portfolio' ) )

    by

    ! is_singular( array( 'posts','quickblog', 'portfolio' ) )


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

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