Hi All, Just wondering what the code is to call the events widget? I have it on my sidebar but I also want to put it on my homepage separate to the sidebar.
Is there a get_event_widget() or something I can call?
Thanks,
Zoe
Hi All, Just wondering what the code is to call the events widget? I have it on my sidebar but I also want to put it on my homepage separate to the sidebar.
Is there a get_event_widget() or something I can call?
Thanks,
Zoe
Great question! Anyone know the answer to this?
Found this thread - http://wordpress.org/support/topic/calling-28-widgets-directly-from-templateplugin?replies=8 - which informs how to do it in a general sense and this code works for the list widget that you could work off of:
<?php $instance = array("title" => "My Widget", "number" => 9);
$args = array("title" => "My Widget", "before_title" => "<h2>", "after_title" => "</h2>");
$sb = new Events_List_Widget();
$sb->number = $instance['number'];
$sb->widget($args,$instance); ?>This topic has been closed to new replies.