Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End How do I display Widgets in Custom Theme?

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #186223
    rouviere
    Participant

    I am working with a barebones custom template that has been stripped of most of the basic WP code.

    I have a weather widget that I would like to display on the site but do not know how to display it? The widget shortcode is [wunderground].

    #186245
    mikes02
    Participant

    This should get you started:
    http://codex.wordpress.org/Function_Reference/do_shortcode

    If the widget has a shortcode as you say it does then in your template file you could do:

    <?php echo do_shortcode('[wunderground]'); ?>

    #186248
    rouviere
    Participant

    Hi Mike,

    Thanks for the response. What do I do if there isn’t a known short code for the widget?

    #186255
    mikes02
    Participant

    Assuming you had it registered in your functions.php file you’d want to follow the instructions here: http://codex.wordpress.org/Function_Reference/dynamic_sidebar

    #186442
    rouviere
    Participant

    Thanks for the help Mike. I got this working now.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Back End’ is closed to new topics and replies.