Thumbnail with Event List Advanced Widget

Home Forums Calendar Products Events Calendar PRO Thumbnail with Event List Advanced Widget

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #47783
    titusraj
    Participant

    Hi,
    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
    Titus

    #47821
    Barry
    Member

    Hi 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.

    #48089
    christina
    Participant

    I’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?

    #48092
    Barry
    Member

    It’s contained in the plugin directory:

    the-events-calendar/resources/events.css

    #48095
    christina
    Participant

    Thanks! 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

    #48141
    titusraj
    Participant

    I 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’);
    }

    #48142
    titusraj
    Participant

    This 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;
    }
    }

    #48143
    titusraj
    Participant

    You 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;
    }
    }

    #48208
    Barry
    Member

    Thanks 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.

    #48508
    jefftom
    Participant

    I 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?

    #48523
    titusraj
    Participant

    Hi 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
    Titus

    #48578
    Barry
    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.

    #48584
    titusraj
    Participant

    Hi 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

    #48593
    Barry
    Member

    Oh 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?

    #48594
    titusraj
    Participant

    we will wait till 3.0, I hope it has all the solutions 🙂

Viewing 15 posts - 1 through 15 (of 16 total)
  • The topic ‘Thumbnail with Event List Advanced Widget’ is closed to new replies.