Custom Event List Pagination

Home Forums Calendar Products Events Calendar PRO Custom Event List Pagination

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1255662
    Richard Schalin
    Participant

    Hello Support Team,

    I would like to integrate the snippet found here https://theeventscalendar.com/knowledgebase/custom-event-list-pagination/ to add pagination with wp-pagenavi to an event category page. I know how to filter the query by category, but want to know if I can add other shortcode’s parameters to display venue and thumbnails? I am trying to recreate the display on this page after setting up pagination. http://shopsattheridge.com/restaurant-kerrville-cafe-at-the-ridge/live-music-2/ What is the best way to approach that?

    • This topic was modified 9 years, 1 month ago by Richard Schalin. Reason: typo
    #1255831
    George
    Participant

    Thanks for reaching out, @mschalin,

    We provide that Knowledgebase guide as-is and unfortunately cannot provide any further assistance with modifying how our plugins look or behave.

    Please read this page before responding: https://theeventscalendar.com/knowledgebase/what-support-is-provided-for-license-holders/


    With that being said, I’m happy to at least try and help point you in the right direction. 😉

    So when it comes to this:

    I know how to filter the query by category, but want to know if I can add other shortcode’s parameters to display venue and thumbnails

    Here are some tips.

    First, if you want to add other things like thumbnails and venues, you need to first learn the functions that will generate things like thumbnails and venues. To do that, head to this folder within your copy of The Events Calendar:

    the-events-calendar/src/functions/template-tags

    ↑ This folder is full of files, which are themselves full of functions you can use to show specific event data! 😀

    So now let’s take a look at this part of the code in the Knowledgebase article you referenced:


    // If we got some results, let's list 'em
    while ( $upcoming->have_posts() ) {
    $upcoming->the_post();
    $title = get_the_title();
    $date = tribe_get_start_date();

    // Of course, you could and probably would expand on this
    // and add more info and better formatting
    echo "

    $title $date

    ";
    }

    Want to show the venue name for the event? Well then head to the venue.php file in the folder I shared above, and you’ll find this function: tribe_get_venue().

    So tweak the code so it looks like this:


    // If we got some results, let's list 'em
    while ( $upcoming->have_posts() ) {
    $upcoming->the_post();
    $title = get_the_title();
    $date = tribe_get_start_date();

    // Of course, you could and probably would expand on this
    // and add more info and better formatting
    echo "

    $title $date

    ";

    // Echo the venue title.
    echo tribe_get_venue();
    }

    Want to add a thumbnail? Head to the general.php file in the folder I shared above, and you’ll find this function: tribe_event_featured_image().

    So tweak the code so it looks like this:


    // If we got some results, let's list 'em
    while ( $upcoming->have_posts() ) {
    $upcoming->the_post();
    $title = get_the_title();
    $date = tribe_get_start_date();

    // Of course, you could and probably would expand on this
    // and add more info and better formatting
    echo "

    $title $date

    ";

    // Echo the featured image.
    echo tribe_event_featured_image();

    // Echo the venue title.
    echo tribe_get_venue();
    }


    We will not be able to provide any further assistance with custom coding here, but I hope this is a helpful thing to get you started in the right direction.

    Cheers!
    George

    #1267086
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Custom Event List Pagination’ is closed to new replies.