{"id":71201,"date":"2013-10-15T21:10:38","date_gmt":"2013-10-16T04:10:38","guid":{"rendered":"http:\/\/tri.be\/support\/forums\/topic\/customized-event-list-widget-how-to-display-post_content\/"},"modified":"2015-07-07T06:29:06","modified_gmt":"2015-07-07T13:29:06","slug":"customized-event-list-widget-how-to-display-post_content","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customized-event-list-widget-how-to-display-post_content\/","title":{"rendered":"customized event list widget- how to display post_content?"},"content":{"rendered":"<p>I am trying to cobble together a &#8220;next event&#8221; widget which will display pretty much exactly what you see when you are viewing a single event. I have managed to duplicate the event list widget, and give my new one a different name, and get it to appear in my widgets, and it works.<br \/>\nNow- I am trying to figure out how to get it to display the details of the event, which is in the event field &#8220;post_content&#8221; (I looked in phpmyadmin at the database to see what the proper field is).<\/p>\n<p>In the list-widget.php file (which is what you override to customize the list widget) there are functions called like tribe_get_phone(),tribe_get_organizer(), tribe_events_event_schedule_details(), and I have found those funcs in the-events-calendar\/public\/template-tags\/general.php. But I don&#8217;t see anything that read the event content.<\/p>\n<p>What I have done so far is this:<br \/>\n&#8211; I created plugins\/events-calendar-pro\/lib\/widget-show-next-event.class.php (a copy of widget-advanced-list.class.php)<br \/>\n&#8211; I created plugins\/events-calendar-pro\/admin-views\/widget-admin-next-event.php (a copy of widget-admin-advanced-list.php)<br \/>\n&#8211; In the main events-calendar-pro.php file, I pull in my new class, and register the widget:<br \/>\npublic function pro_widgets_init() {<br \/>\n&#8230;<br \/>\nrequire_once( &#8216;lib\/widget-show-next-event.class.php&#8217; ); \/\/my new class<br \/>\nregister_widget( &#8216;TribeNextEventWidget&#8217; ); \/\/my new widget<br \/>\n}<br \/>\n&#8211; I created {my theme}\/tribe-events\/widgets\/next-event-widget.php (a copy of list-widget.php)<br \/>\n&#8211; I attempted to cause my widget-show-next-event.class.php file to use my new next-event-widget.php by referring to &#8220;next-event-widget&#8221;, to no avail:<br \/>\nfunction widget( $args, $instance ) {<br \/>\n\/\/ Use parent&#8217;s output function with the premium template.<br \/>\nself::$params = $instance;<br \/>\nreturn parent::widget_output( $args, $instance, &#8216;next-event-widget&#8217;, &#8216;widgets&#8217;, &#8216;pro&#8217;, TribeEventsPro::instance()-&gt;pluginPath );<br \/>\n}<\/p>\n<p>So, 2 issues:<br \/>\n1. How can I get my custom template file (next-event-widget.php) to be used? I assume that putting it in my theme folder is the right thing to do, as you describe in your help doc on theming.<br \/>\n2. How do I display the event details, and pretty much all the other fields. It can be hard-coded- it doesn&#8217;t need to be customizable like the event list widget<\/p>\n<p>Clearly, I&#8217;m off in the weeds here, and this is brute force, but I gotta get it going. Thanks!<\/p>\n","protected":false},"template":"","class_list":["post-71201","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>customized event list widget- how to display post_content? -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customized-event-list-widget-how-to-display-post_content\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"customized event list widget- how to display post_content? -\" \/>\n<meta property=\"og:description\" content=\"I am trying to cobble together a &#8220;next event&#8221; widget which will display pretty much exactly what you see when you are viewing a single event. I have managed to duplicate the event list widget, and give my new one a different name, and get it to appear in my widgets, and it works. Now- [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customized-event-list-widget-how-to-display-post_content\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-07-07T13:29:06+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customized-event-list-widget-how-to-display-post_content\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customized-event-list-widget-how-to-display-post_content\/\",\"name\":\"customized event list widget- how to display post_content? -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2013-10-16T04:10:38+00:00\",\"dateModified\":\"2015-07-07T13:29:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customized-event-list-widget-how-to-display-post_content\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customized-event-list-widget-how-to-display-post_content\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customized-event-list-widget-how-to-display-post_content\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"customized event list widget- how to display post_content?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"customized event list widget- how to display post_content? -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customized-event-list-widget-how-to-display-post_content\/","og_locale":"en_US","og_type":"article","og_title":"customized event list widget- how to display post_content? -","og_description":"I am trying to cobble together a &#8220;next event&#8221; widget which will display pretty much exactly what you see when you are viewing a single event. I have managed to duplicate the event list widget, and give my new one a different name, and get it to appear in my widgets, and it works. Now- [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customized-event-list-widget-how-to-display-post_content\/","article_modified_time":"2015-07-07T13:29:06+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customized-event-list-widget-how-to-display-post_content\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customized-event-list-widget-how-to-display-post_content\/","name":"customized event list widget- how to display post_content? -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2013-10-16T04:10:38+00:00","dateModified":"2015-07-07T13:29:06+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customized-event-list-widget-how-to-display-post_content\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/customized-event-list-widget-how-to-display-post_content\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/customized-event-list-widget-how-to-display-post_content\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"customized event list widget- how to display post_content?"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/71201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/71201\/revisions"}],"predecessor-version":[{"id":981444,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/71201\/revisions\/981444"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=71201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}