The Events Calendar
hardcode call to widget (3 posts)

  1. Zoee
    Posted 5 years ago #

    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?



  2. zunskigraphics
    Posted 5 years ago #

    Great question! Anyone know the answer to this?

  3. idealien
    Posted 5 years ago #

    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); ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • The Events Calendar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic