thinkdm2
Forum Replies Created
-
Forum: Plugins
In reply to: [The Events Calendar] Multiple Instances of CalendarThanks for the response.
After doing some looking around, I happened to find what you are describing as a FAQ on your website.
I think that will work for what I need.
Thanks, again.
Forum: Plugins
In reply to: [The Events Calendar] Multiple Instances of CalendarNot a bad idea. Would you happen to know how to go about setting that up?
Unfortunately, I have very little PHP knowledge.
Thanks!
Ah, ok. Well, in the meantime, maybe you can help me out with a similar issue I am trying to resolve.
In ‘List’ view, I am trying to create an if/else statement for the date, but since I have little to no knowledge of PHP, I cannot get it to work.
Here is what I am trying to do:
If the event runs over multiple days in the same month, I would like it to display like this:
“Month 00 – 00, 0000 0:00 pm – 00:00 pm”
BUT, if the event runs over multiple days over two different months, I would like it to display like this:
“Month 00 – Month 00, 0000 0:00 pm – 00:00 pm”
Here is my poor attempt at a PHP if/else statement, comparing the start date month to the end date month:
<?php if ( tribe_is_multiday() && !tribe_is_day() ) : ?> <?php if ( tribe_get_start_date('F') !== tribe_get_end_date('F') ) : ?> <h4 class="event-day"><?php echo tribe_get_start_date( null, false, 'F j' ); ?> – <?php echo tribe_get_end_date( null, false, 'F j, Y' ); ?> – <?php echo tribe_get_start_date( null, false, 'g:ia' ); ?></h4> <?php else: ?> <h4 class="event-day"><?php echo tribe_get_start_date( null, false, 'F j' ); ?> - <?php echo tribe_get_end_date( null, false, 'j, Y' ); ?> – <?php echo tribe_get_start_date( null, false, 'g:ia' ); ?></h4> <?php endif; ?> <?php endif; ?>Ok, so I found the line of code that adds the Country to the address.
For my particular project I do not need the Country at all, so I removed it completely.
To do so, I copied the ‘full-address.php’ file that located in the ‘views’ directory.
Then I created an ‘events’ folder inside my theme folder.
After you have done so, open ‘full-address.php’ in your editor of choice and remove lines 39-41. They should look like this:
<?php if( tribe_get_country( $postId ) ) { ?> <?php $address_out []= '<span itemprop="addressCountry">' . tribe_get_country( $postId ) . '</span>'; ?> <?php } ?>Refresh your page, and you should notice that the country is no longer showing.
Hope that helps!
I would also like the option to not display the Country if left blank, or as “Select A Country”.
Thanks.