• Resolved suskanchan

    (@suskanchan)


    I’d like to add an additional widget (for ex, eNews Extended) below the plugin. I wrote the following code but it doesn’t show on the blog page.

    genesis_register_sidebar( array(
    ‘id’ => ‘after-teaser’,
    ‘name’ => __( ‘After Teaser Widget’, ‘wpsites’ ),
    ‘description’ => __( ‘This is the before post widget area on the blog page only.’, ‘wpsites’ ),
    ) );

    add_action( ‘genesis_after_content’, ‘leaguewp_after_teaser_widget’ ); //* Tying the Widget After the Pagination
    function leaguewp_after_teaser_widget() {
    if ( is_page( ‘280’ ) )
    genesis_widget_area( ‘after-teaser’, array(
    ‘before’ => ‘<div class=”after-teaser widget-area”>’,
    ‘after’ => ‘</div>’,
    ));

    }

Viewing 1 replies (of 1 total)
  • Plugin Author Bill Erickson

    (@billerickson)

    You should probably use genesis_after_loop hook, as that will run after all the posts have displayed.

    genesis_after_content is the old XHTML hook used for the post content, so that would display your widget after EVERY post on the page. If you’re using a theme built in the past year or two, you’ll want to use the HTML5 hook, genesis_after_entry, if you want somethign to show up at the bottom of every post.

    Also, your code is displaying the widget area if is_page( 280 ), but this plugin does not run on pages, it only runs on post archives.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding Additional Widget on Under This Plugin’ is closed to new replies.