aling

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • in reply to: Photos View Navigation #597800
    aling
    Participant

    Thanks Casey!
    That helped! It was only a simple if else statement. Thank you very much!!

    in reply to: Photos View Navigation #581526
    aling
    Participant

    Okies, I think I will keep it simple and just remove the next/prev options. Instead I just added my own button of calendar view and past events.

    My question about that is, when I’m on the past events page, it still shows “past events” and “calendar view” buttons. I would I be able to do an if statement based on if the page I’m on is displaying past events?

    I wanted to write something like, if events being displayed/url == past, show only calendar view button, else show both button.

    in reply to: Events Calendar Pro & SiteOrigin's Page Builder Widget #580279
    aling
    Participant

    I was able to get get help via stackoverflow.com. Someone rewrote my code and it’s working fine now.

    in reply to: Events Calendar Pro & SiteOrigin's Page Builder Widget #579509
    aling
    Participant

    Well the existing widget is perfectly fine, however, I would like to be able to select which event will display based on whether the additional field I set is Yes or No.

    I guess I will just have to play around with it. I can write it out no problem if I made my own homepage template but I’m using Site Origin’s homepage builder widget stuff and I was trying to make things a little easier for the user who will be updating the site vs them having to deal with html code and possibly messing up the site.

    in reply to: Photos View Navigation #579463
    aling
    Participant

    Got it. I will try that out when I get back on the project sometime today. Thank you!

    in reply to: Events Calendar Pro & SiteOrigin's Page Builder Widget #560740
    aling
    Participant

    This is what I came up with but it’s still not right:

    
    <div class="tribe-venue-widget-wrapper">
    	
      <?php while ( $events->have_posts() ): ?> <?php $events->the_post(); foreach($events as $event){ setup_postdata($event); $id=get_the_ID(); $showOnHomepage=get_post_meta($id,'_ecp_custom_4',true); date_default_timezone_set('America/Los_Angeles'); $todayDate = date("Y-m-d H:i:s"); $eventDate=get_post_meta($id,'_EventEndDate', "Y-m-d H:i:s"); if (($showOnHomepage == 'Yes') && ($eventDate >= $todayDate)) { $link=get_permalink($id); echo "
    • "; the_post_thumbnail('medium'); echo "
    • "; } } ?> <?php endwhile; ?> <div style="clear:both"></div>
    </div>
    in reply to: Events Calendar Pro & SiteOrigin's Page Builder Widget #560669
    aling
    Participant

    Hi Barry-
    Thanks for getting back to me. I actually want to be able to see if the custom field is set, if it is, then I want that event to display on the homepage (which is the first set of code above that I’m using on our other site not in the venue-widget.php).
    I guess my problem is not knowing how to write that into the 2nd set of code I have above because I don’t understand what $events->have_posts() is. Like I understand while events have post but how do I incorporate an if statement within a while loop? Or is that beyond the scope?

    in reply to: Past Events Page #560633
    aling
    Participant

    Okies, thank you!

    in reply to: Weird design changes – no columns, images look strange #560579
    aling
    Participant

    Is there a way to make it 4 column?

    in reply to: Photos View Navigation #560380
    aling
    Participant

    So instead, I ended up adjusting the nav piece saying if the date of the event is past todays date, change the copy to say “View Past Events” and vice versa.

    I have 15 events set for each page. My problem now is that, when I go to events page, even though I only have 9 events listed, the navigation piece keeps showing “Next Events” when there is none. How do I write it, so that the navigation doesn’t display if there are no more events?

    Here is what I have. I took out the a tag so that the code would display nicely on here.

    
        <?php $id=get_the_ID();
    		date_default_timezone_set('America/Los_Angeles');
    		$todayDate = date("Y-m-d H:i:s");
    		$eventDate=get_post_meta($id,'_EventEndDate', "Y-m-d H:i:s");
    	?>
        <?php if($eventDate >= $todayDate) :?>
    		<li class="tribe-events-nav-previous"><?php _e( '<span>«</span> View Past Events', 'tribe-events-calendar-pro' ) ?>
        <?php else : ?>
        	<li class="tribe-events-nav-previous"><?php _e( '<span>«</span> Previous Events', 'tribe-events-calendar-pro' ) ?>
        <?php endif;?>
        
        
        
    	<!-- Display Next Page Navigation -->
        <?php if($eventDate <= $todayDate) :?>
            <li class="tribe-events-nav-next">
                <?php _e( 'View Current Events <span>»</span>', 'tribe-events-calendar-pro' ) ?>
            <!-- .tribe-events-nav-next -->
        <?php else : ?>
        	<li class="tribe-events-nav-next">
                <?php _e( 'Next Events <span>»</span>', 'tribe-events-calendar-pro' ) ?>
            
        <?php endif;?>
    
    in reply to: Disable calendar view popup (tooltip) #414038
    aling
    Participant

    Perhaps you can even just take out “$post” in the data-tribejson. Not sure. Would have to play around with it. But I think that piece is how the calendar gets the data as far as the post thumbnail and link.

    in reply to: Disable calendar view popup (tooltip) #414015
    aling
    Participant

    I know that the tooltip display for calendar view is displayed via plugins > the events calendar > views > months > single-event.php.

    I tried removing this piece “data-tribejson='<?php echo tribe_events_template_data( $post );” but it didn’t seem to work so I just used the CSS and set the tooltip piece to display: none;

    in reply to: Still display events that have passed #413920
    aling
    Participant

    Just wanted to say thank you Casey for giving me an idea. I was able to add to my existing code so that on our homepage, any event end date/time that is < current date/time will fall off. Now I do not have to work on weekends! lol.

    in reply to: Date comparison #398856
    aling
    Participant

    Forgot to close this out.

    in reply to: Date comparison #398441
    aling
    Participant

    Alright, so here is what I wrote and it seemed to work but am no sure if this is correct way of writing it or not.

    $todayDate = date(“Y-m-d H:i:s”);
    $eventDate=get_post_meta($id,’_EventStartDate’, “Y-m-d H:i:s”);
    if ((strtolower($linkr)==’yes’) && ($eventDate >= $todayDate))

Viewing 15 posts - 1 through 15 (of 23 total)