Forum Replies Created
-
AuthorPosts
-
Steve
ParticipantBarry,
Got it. Thanks for looking into it and pointing me in the right direction. Will report back if I come up with anything.
SteveSteve
Participantok, thanks Barry
Steve
Participantemail has been sent to [email protected] attention Barry.
Steve
ParticipantBarry,
It’s on a client’s site which is setup to be private. Is there a way I can send you login credentials?Steve West
[email protected]December 11, 2012 at 12:56 pm in reply to: Events List Advanced Widget not showing any upcoming events #29254Steve
ParticipantJonah,
ECP is in use on a live site, so I’m not able to debug by deactivating other plugins or reverting to Twenty Eleven. However, I have found the source of the problem and solved it, so I’ll include my snippet here in case anyone else encounters this issue. Doesn’t appear to have been a problem with the Events List Advanced Widget. But I do wonder why the other 2 widgets worked fine without the following modification.
ECP is being used in a highly modified version of WooThemes Bookclub, which is itself a child theme of WooThemes listings. A custom post type was added for a new entity named “resource” which could be a document, an image file, or an audio/video clip. In order to get category archives to work like the client wanted, we needed to add the CPT to the query used to generate the category archive. In order to get Events List Widget to display upcoming events we added ‘tribe_events’ to the function in functions.php that modified the query:
/*——————————————————————–*/
/* add custom post types to archives page
/* needed to add ‘nav_menu_item’ to post_type array so that menus wouldn’t get filtered out. See comments on post below:
/* http://wpsnipp.com/index.php/archives/add-custom-post-types-to-archives-page/
/*———————————————————————-*/function add_custom_types_archive( $query ) {
if( is_category() || is_tag() && empty( $query->query_vars[‘suppress_filters’] ) ) {
$query->set( ‘post_type’, array(
‘post’, ‘resource’, ‘tribe_events’, ‘nav_menu_item’
));
return $query;
}
}
add_filter( ‘pre_get_posts’, ‘add_custom_types_archive’ );Hope this helps someone else who might have been doing their own head banging over this.
Steve
-
AuthorPosts
