Matthew

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 59 total)
  • Author
    Posts
  • in reply to: hide events that have started already #1057215
    Matthew
    Participant

    Hi Josh,

    Thanks for continuing with this for me. I’m afraid I don’t know how to write code so I didn’t really understand your last comment. I had a try anyway and modified the snippet to the following:

    <?php 
    $start_date = tribe_get_start_date( $post->ID, false, 'U' );
    $current_day = time();
     
    if( tribe_event_is_multiday() && $start_date > $current_day ) { ?>
    <div id="tribe-events-event-<?php echo esc_attr( $event_id ); ?>" class="<?php tribe_events_event_classes() ?>" data-tribejson='<?php echo esc_attr( tribe_events_template_data( $post ) ); ?>'>
    <h3 class="tribe-events-month-event-title"><a href="<?php echo esc_url( $link ) ?>" class="url"><?php echo $title ?></a></h3>
    </div><!-- #tribe-events-event-# -->
    <?php
    }

    Unfortunately that did not work. The month view continues to only show events that have yet to start but the list view still shows events that have already started.

    Was the way I wrote the code wrong?

    Thanks,
    Mat

    in reply to: hide events that have started already #1056661
    Matthew
    Participant

    Hi Josh,

    That seems to be working perfectly on month view now, thanks.

    How do I get it to work on list and map views? It is still displaying events that have already started in list view currently. The code in /wp-content/plugins/the-events-calendar/src/views/list/single-event.php is very different from /wp-content/plugins/the-events-calendar/src/views/month/single-event.php and I can’t find any template for map view.

    Thanks,
    Mat

    in reply to: hide events that have started already #1055055
    Matthew
    Participant

    Hi Josh,

    Actually month view is behaving very strangely now. I created a test event with start date today and end on friday (all day event). As you said it did not show. I changed the start date tomorrow to check that it would show up, it did not. I changed the end date to the same as the start date (one-day all day event) and it shows up. I made the event start on friday at 9am and end on sunday ay 6pm and it disappeared again. I deleted the snippet and events lasting more than a single day show up again as normal.

    Essentially, the snippet seems to prevent any event that spans multiple days from showing up in the month view (it also hides all my other non-test multi-day events). The events show up in the list view as normal.

    Cheers,
    Mat

    in reply to: hide events that have started already #1053602
    Matthew
    Participant

    Hi Josh,

    This is the folder I put it in:

    pootlepress-child-theme/tribe-events/month/single-event.php

    You can see exactly how I formatted it in that screenshot.

    What am I missing?

    Cheers,
    Mat

    in reply to: How to edit the submit an event form #1053600
    Matthew
    Participant

    Hi Brian,

    That worked nicely.

    Thanks mate,
    Mat

    in reply to: How to edit the submit an event form #1052955
    Matthew
    Participant

    Hi Brian,

    I had read that article 3 times, it’s not very easy to understand.

    After trying a bunch of different stuff I found I already had that snippet in my site plugin:

    http://nimb.ws/qpR9vy

    If I paste the snippet again later the site breaks and it tells me I cant ‘redeclare function tribe_custom_theme_text’.

    I tried modifying the code to include the snippet you gave me but that doesn’t do anything. I presume I need to specify the text domain somehow?

    This is what I tried, the site didn’t break but nothing happens to ‘Price’:

    /*
     * EXAMPLE OF CHANGING ANY TEXT (STRING) IN THE EVENTS CALENDAR
     * See the codex to learn more about WP text domains:
     * <a href="http://codex.wordpress.org/Translating_WordPress#Localization_Technology" rel="nofollow">http://codex.wordpress.org/Translating_WordPress#Localization_Technology</a>
     * Example Tribe domains: 'tribe-events-calendar', 'tribe-events-calendar-pro'...
     */
    function tribe_custom_theme_text ( $translations, $text, $domain ) {
     
        // Put your custom text here in a key > value pair
        // Example: 'Text you want to change' > 'This is what it will be changed to'
        // The text you want to change is the key, and it is case-sensitive
        // The text you want to change it to is the value
        // You can freely add or remove key > values, but make sure to separate them with a comma
        $custom_text = array(
            'Location' => 'Enter a City, Zip or Postcode',
          	'Price:' => 'Price: (USD)',
        );
    
        // If this text domain starts with "tribe-", and we have replacement text
        if(strpos($domain, 'tribe-') === 0 && array_key_exists($text, $custom_text) ) {
            $text = $custom_text[$text];
        }
     
        return $text;
    
    }
    add_filter('gettext', 'tribe_custom_theme_text', 20, 3);

    How do I change the word ‘Price’ and keep my changes to the word ‘Location’?

    Thanks,
    Mat

    in reply to: How to edit the submit an event form #1052569
    Matthew
    Participant

    Thanks for getting back to me Brian.

    I put that snippet in my custom plugin (I use this instead of the functions.php) and unfortunately nothing has changed on the Submit an Event page. You can see where I put the code in this screenshot:

    https://nimbus.everhelper.me/client/notes/share/366470/ZnbWbcwHI0usWcc09Zv2VpRVQVa33SgM/

    Have I entered something incorrectly?

    Thanks,
    Mat

    in reply to: hide events that have started already #1051891
    Matthew
    Participant

    Hi Josh,

    I tried putting that code in the month view (in my child theme). It doesn’t seem to have stopped events that have started showing up. You can see the code in my child theme here:

    https://nimbus.everhelper.me/client/notes/share/365686/hBCMU9y3qKIVHE5UwXamWc7qdqbG0LKE/

    Actually, I only use the list and map view. I found the single.event.php in /wp-content/plugins/the-events-calendar/src/views/list but when I opened it I had no idea where to put your snippet! 🙂

    So I have 2 questions.

    1 – Why did the snippet I set up for month view not work?
    2 – How do I edit the list and map views to prevent events that have started from showing?

    Thanks again Josh,
    Mat

    in reply to: Default tickets set to 0 #1050937
    Matthew
    Participant

    Hi Brook,

    That worked nicely, thanks mate.

    I see what you mean that if more than one ticket is available it will add one of each to the cart. I hadn’t thought of that! It may come up as an issue if my vendors make multiple tickets available. I think your suggestion that it defaults to one if only one ticket type is available would be an excellent solution. If you guys could consider it for a future update I would much appreciate it 🙂

    Cheers,

    Mat

    in reply to: Default tickets set to 0 #1050276
    Matthew
    Participant

    Hi Brook,

    Thanks for you help. It works if I edit it directly in your plugin but when I followed the Themers Guide advice and created the folder in my child theme to overwrite your plugin instructions it doesn’t work. Have I set up the folder wrong or something? This is the directory I created:

    /wp-content/themes/pootlepress-child-theme/tribe-events/event-tickets-plus/src/views/wootickets

    Then I put the tickets.php in there and changed the input value to 1. You can see it in the wordpress backend in this screenshot:

    http://nimb.ws/GJO2o4

    I tried clearing the cache but that didn’t help. What am I missing?

    Cheers,
    Mat

    in reply to: hide events that have started already #1050272
    Matthew
    Participant

    Hi Josh,

    It is for multi-date events. So if the calendar didn’t display events with a start date before the current date that would solve the issue (it is fine to display events that started earlier that day).

    Does that make sense?

    Thanks,
    Mat

    in reply to: No Styling on attendee list page #1043916
    Matthew
    Participant

    Hi George,

    I just updated to 4.0.2 and the styling on the attendee page seems to be working fine now. I’ll open a new thread if the issue returns.

    Thanks mate,
    Mat

    in reply to: No Styling on attendee list page #1042676
    Matthew
    Participant

    Ok, thanks George, please just let me know when you get some more info 🙂

    Mat

    in reply to: No Styling on attendee list page #1041958
    Matthew
    Participant

    This reply is private.

    in reply to: change heading text in event-bar #1025102
    Matthew
    Participant

    That worked nicely,

    thanks Brook

Viewing 15 posts - 16 through 30 (of 59 total)