WordPress.org

Ready to get started?Download WordPress

Forums

Widget Logic
show on blog excerp (2 posts)

  1. andaluzo
    Member
    Posted 1 year ago #

    Hi,

    i want to show a widget on the blog excerp page and can not get it to work.

    Thanks for a little push :)

    http://wordpress.org/extend/plugins/widget-logic/

  2. Yuga Gopalakrishnan
    Member
    Posted 1 year ago #

    First, register a widget sidebar in function.php with the following code.
    register_sidebar( array(
    'name' => 'Custom Widget',
    'id' => 'custom-widget',
    'before_widget' => '<div>',
    'after_widget' => '</div>',
    'before_title' => '<h2 class="rounded">',
    'after_title' => '</h2>',
    ) );

    You will see this widget in WordPress back end >> Appearance >> Widget >> Custom Widget and copy/paste your content in this widget. Once done,

    Copy the following code in any PHP file where you want to show up the widget/content.

    <?php dynamic_sidebar('Custom Widget'); ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.