Events list and sidebar

Home Forums Calendar Products Events Calendar PRO Events list and sidebar

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #958064
    casasbrancas
    Participant

    Hi,

    We’ve been using The Events Calendar for quite a while now (availabe here: http://agenda.casasbrancas.pt) and we’re facing different issues that we didn’t clear resolve. First we wanted to list the next number of events on a specific page, on a specific region. We’ve scrapped that and found a remedy using this solution:

    function getAgenda(){
    $date=new DateTime();
    $events = tribe_get_events( array(
    ‘posts_per_page’ => 3,
    ‘start_date’ => $date->format(‘Y-m-d H:i:s’)
    ) );
    foreach ( $events as $event ) {
    echo ‘<div class=”portfolio-meta-wrapper” style=”float: left; width: 210px; margin-left: 5px; text-align: left;”>’;
    echo ‘ID) .'”>’. get_the_post_thumbnail($event->ID, ‘thumbnail’ ). ‘‘;
    echo ‘<h3 class=”the-title”>ID) . ‘” rel=”bookmark”>’ . $event->post_title . ‘</h2>’;

    if(tribe_get_end_date($event->ID, false)!=tribe_get_start_date($event->ID,false)){
    $str_enddate=tribe_get_end_date($event->ID, true);
    }else{
    $str_enddate=tribe_get_end_time($event->ID,false);
    }

    echo ‘<div style=”font-size:80%;”><b>’ . tribe_get_recurrence_text($event->ID) . ‘<br>’ .tribe_get_start_date($event->ID,true) . ‘ – ‘ . $str_enddate . ‘</b></div>’;
    echo ‘<div class=”excerto_agenda”>’ . $event->post_excerpt . ‘</div>’;
    echo ‘</div>’;

    }
    }

    We’re a tourism association and you can see this feature on every member’s page, like this one: http://herdadedamatinha.casasbrancas.pt. Is posted and showing but not working well, for instance we couldn’t sort out the code for the local and the responsiveness behaviour is not really good.

    Other thing is the sidebar that is missing in every event. Also need some help on that. We’re using a template that’s based on Visual Composer and we’re using WPML for translations. We have dug the code but couldn’t find a solution for it. (http://www.casasbrancas.pt/evento/sons-do-mira-em-concertos-de-pascoa)

    We also wanted to control the featured image better, so we could style each page better, but I guess we have to do that on the CSS file.

    Finally, our recurrent events don’t show up on certain events. They exist, but we don’t know what’s the problem. I’m a bit of afraid to scratch down the plugins or move to another template for testing. But we have a copy of the site on another address that we can use for that effect.

    I don’t know if you can help us. But we’ll be most thankful for that. Thank you.

    Best regards,

    Our best regards.

    #958299
    George
    Participant

    Hello,

    Since most of your questions relate to custom implementations of The Events Calendar on your site, we can only provide limited help for those specific questions. But fortunately, most of your questions are squarely within the realm of possibility, and we can at least offer some advice and suggestions that you can take and build on from there. I’ll address your questions in order:


    We’re a tourism association and you can see this feature on every member’s page, like this one: http://herdadedamatinha.casasbrancas.pt. Is posted and showing but not working well, for instance we couldn’t sort out the code for the local and the responsiveness behaviour is not really good.

    For handling the responsiveness of anything custom-made on your site, you will have to write custom CSS yourself to make things adapt to different browser widths in accordance with your theme. I’d highly recommend getting a tool like Firebug if you use FireFox, or the Developer Tools for either Safari or Chrome to help make the process of writing this custom CSS much easier.

    If your tribe_get_events() queries are not showing events reliably by location and other parameters you need, then you may find it better to just write your own custom WP_Query instances. These are a bit more complicated than tribe_get_events(), but let you get a lot more control over how queries are run. One example of how this might be more robust for you is to query by location – you can first find any location-related meta in our official list of meta keys here: https://theeventscalendar.com/knowledgebase/wordpress-post-meta-data/

    Then you can use this meta key in a ‘meta_query’ within your custom WP_Query instances. If these terms are not familiar to you, check out the official WP_Query documentation here → https://codex.wordpress.org/Class_Reference/WP_Query


    Other thing is the sidebar that is missing in every event. Also need some help on that. We’re using a template that’s based on Visual Composer and we’re using WPML for translations. We have dug the code but couldn’t find a solution for it. (http://www.casasbrancas.pt/evento/sons-do-mira-em-concertos-de-pascoa)

    If you can’t get your theme’s sidebar to show up on your events pages, then your best bet might be to make a custom version of The Events Calendar’s single-event.php file in your theme, and then manually copy some of your theme’s sidebar registration code into this modified version of the single event template. We have a thorough guide on making a theme-specific version of files like this in our official themer’s guide here → https://theeventscalendar.com/knowledgebase/themers-guide/


    We also wanted to control the featured image better, so we could style each page better, but I guess we have to do that on the CSS file.

    You can indeed customize how featured images appear with CSS – for any CSS customizations you want to make on your site, you should add the custom code to the bottom of your theme’s style.css file.

    You can get even more control over how featured images show up by modifying events templates as shown in the Themer’s Guide link shared above.


    Finally, our recurrent events don’t show up on certain events. They exist, but we don’t know what’s the problem.

    Can you clarify what you mean here a bit? I’m sorry for my confusion, but I’m not 100% what the nature of this problem is as you describe it here.

    I’m a bit of afraid to scratch down the plugins or move to another template for testing. But we have a copy of the site on another address that we can use for that effect.

    If you can indeed run through those steps on that copy of your site, that might be very helpful. We have a full list of our troubleshooting steps here that you should run through → https://theeventscalendar.com/knowledgebase/testing-for-conflicts/

    Let us know if you do those steps and what you find by running through them.


    There’s a lot of information here, and I’m sorry about any disappointment that might arise related to our limited customization support, but hopefully you find this information helpful as a good place to start! We can handle your recurrence-related issue further from here as the other customization-related issues hopefully clear up, just to keep things organized.

    Thanks!
    George

    #984095
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Events list and sidebar’ is closed to new replies.