WordPress.org

Ready to get started?Download WordPress

Forums

Insert widget in theme without widget support? (6 posts)

  1. cacoe
    Member
    Posted 3 years ago #

    Is there a universal way to insert a widget on a theme without widget support or is it a per widget thing?

    I'm not bothered about creating widget areas on the theme I use (unless I need to do that to make this work), I just want to insert this particular widget:

    http://wordpress.org/extend/plugins/social-media-widget

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    You have to create a widget area to use that plugin/widget.

  3. kreativjustin
    Member
    Posted 3 years ago #

    Yep, esmi is right. Themes will not use widgets unless the theme is 'widgetized'.

    http://codex.wordpress.org/Widgetizing_Themes

    Go there and follow the steps, if you still need help we are here.

  4. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    Actually, if you have a specific location you want to use this particular Widget, just call the_widget() [Codex ref]

    e.g.:

    <?php the_widget( 'Social_Widget' ); ?>

    (Note: refer to the Codex entry. You may need to pass some arguments to the call to the_widget(), in order to customize the appearance of the Widget.)

  5. cacoe
    Member
    Posted 3 years ago #

    Thanks all! Very informative.

    Chip, I assume I'd have to look at the social widget code to see what arguments would need to be passed if it's not documented?

  6. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    Most of it is standard. Take a look at the Codex ref I linked above.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags