Home › Forums › Calendar Products › Events Calendar PRO › Thumbnail with Event List Advanced Widget
- This topic has 15 replies, 4 voices, and was last updated 12 years, 11 months ago by
Barry.
-
AuthorPosts
-
May 7, 2013 at 12:20 am #47783
titusraj
ParticipantHi,
Is there away to add a thumbnail with ‘event list advanced widget’ I notice this option is not available on the event list widget.
Thanks
TitusMay 7, 2013 at 7:50 am #47821Barry
MemberHi Titus,
Have you checked out our Widget Modification tutorials (see our full list of tutorials here)?
They don’t cover this specifically but there is some good guidance on working with and customizing widgets generally, and an example of adding a featured image to the next event widget.
May 9, 2013 at 1:30 pm #48089christina
ParticipantI’ve followed this tutorial and it seems to be working great! I do have a question though, in the tutorial he mentions “Make sure you paste in all the default styling from the stock events.css file though! ”
Where is this file containing the default style located?May 9, 2013 at 1:34 pm #48092Barry
MemberIt’s contained in the plugin directory:
the-events-calendar/resources/events.css
May 9, 2013 at 1:44 pm #48095christina
ParticipantThanks! I’m trying to use this tutorial and apply it to the “List Advanced Widget”. So far so good I’ve added the following code to “events-advanced-list-load-widget-display.php”
“if ( function_exists(‘has_post_thumbnail’) && has_post_thumbnail() ) {
the_post_thumbnail();
}”I was wondering how I could go about making the image a link and added a class to it so I could style it. Thanks
May 9, 2013 at 8:39 pm #48141titusraj
ParticipantI have used this method as a temporary measure as it seemed easier for now as the featured thumbnails, I believe is going to be part of 3.0. However you do have to choose a normal category outside events. If you look at the bottom of my site http://www.musicforlondon.co.uk, under theatre tickets, I get the desired aesthetic effect
Add to theme functions
// Registers core WordPress category and taxonomy taxonomies on the “Events” post type registered by the plugin “The Events Calendar”
add_action( ‘init’, ‘ac_add_calendar_taxonomy’, 20 );
function ac_add_calendar_taxonomy() {
register_taxonomy_for_object_type(‘category’, ‘tribe_events’);
register_taxonomy_for_object_type(‘post_tag’, ‘tribe_events’);
}May 9, 2013 at 9:07 pm #48142titusraj
ParticipantThis is the full code
// Registers core WordPress category and taxonomy taxonomies on the “Events” post type registered by the plugin “The Events Calendar”
add_action( ‘init’, ‘ac_add_calendar_taxonomy’, 20 );
function ac_add_calendar_taxonomy() {
register_taxonomy_for_object_type(‘category’, ‘tribe_events’);
register_taxonomy_for_object_type(‘post_tag’, ‘tribe_events’);
}add_filter(‘pre_get_posts’, ‘query_post_type’);
function query_post_type($query) {
if(is_archive() || is_tag() || is_home() && empty( $query->query_vars[‘suppress_filters’] ) ) {
$post_type = get_query_var(‘post_type’);
if($post_type)
$post_type = $post_type;
else
$post_type = array(‘post’,’tribe_events’,’attachment’);
$query->set(‘post_type’,$post_type);
return $query;
}
}May 9, 2013 at 10:22 pm #48143titusraj
ParticipantYou need to use this otherwise nav bars only appear on the homepage
add_filter(‘pre_get_posts’, ‘query_post_type’);
function query_post_type($query) {
if(is_archive() || is_tag() || is_home() && empty( $query->query_vars[‘suppress_filters’] ) ) {
$post_type = get_query_var(‘post_type’);
if($post_type)
$post_type = $post_type;
else
$post_type = array(‘post’,’tribe_events’,’attachment’,’nav_menu_item’);
$query->set(‘post_type’,$post_type);
return $query;
}
}May 10, 2013 at 10:00 am #48208Barry
MemberThanks for sharing Titus:-) – Christina hopefully that gives you a steer in the right direction.
Just a note for future reference, until we go live with our next set of changes to the forum at least, but it is generally better to use a service like Pastebin or Gist to share code and then paste the link in here – currently the tri.be forum doesn’t handle code too nicely and some elements may be dropped.
May 14, 2013 at 2:35 pm #48508jefftom
ParticipantI see this same issue in Events Calendar 3.0 alpha…I konw it’s early, but I don’t understand why widget doesn’t automatically include the ability to include the featured widget.
How is it done in 3.0?
May 14, 2013 at 6:40 pm #48523titusraj
ParticipantHi Barry, I have got this working the way, except, I can’t get the images to show on the footer widgets for single post or single pages. It works exactly the way I want on the catgories and home page.
Thanks
TitusMay 15, 2013 at 7:13 am #48578Barry
Member@jefftom as The Events Calendar 3.0 is still in beta testing we do not support it on the forum – please report all issues to Rob by email (rob-at-tri-dot-be).
@titusraj I’m not sure I can identify the problem on your site – the footer widgets on your homepage and this single post for instance seem to display nicely and I don’t see any discrepancies.May 15, 2013 at 7:27 am #48584titusraj
ParticipantHi Barry,
I spent half a day trying to work it out but could not figure it out ! if you can’r figure it out, I am cool.
If you look carefully at any single post or page, you will find the footer widgets are missing the new calendar posts that were made via events. Look for ‘we are going on a bear hunt’, ‘death in venice’ and ‘julien clerk’ pr ‘Mr Beau Jangles – Dr John Meets ‘Any help appreciated
May 15, 2013 at 7:48 am #48593Barry
MemberOh OK – I think I was a little slow off the mark there.
So if you are using regular WordPress category widgets (by virtue of registering regular categories/tags against event posts) then you need to remember that the default ordering of posts etc will be in post date order (when the post was created) not event date order.
Unfortunately we can’t really help any further with that sort of custom work – but if I’m understanding you correctly you are happy to wait on 3.0 in any case?
May 15, 2013 at 7:52 am #48594titusraj
Participantwe will wait till 3.0, I hope it has all the solutions 🙂
-
AuthorPosts
- The topic ‘Thumbnail with Event List Advanced Widget’ is closed to new replies.
