Forum Replies Created
-
AuthorPosts
-
mnussbaum
ParticipantI figured it would require custom coding, which is fine. Is there anything in the forums or knowledgebase that relates to accessing and manipulating the Additional Fields that you can point me toward to aid in creating the custom code?
mnussbaum
ParticipantI was actually able to resolve the issue after c/ping it here and seeing it in a different font. The RSVP one had ‘ instead of ‘ which obviously made it not work. Not sure why that happened when c/ping the text. Thanks for the help while working on it! 🙂
mnussbaum
Participant$ticketurl = esc_url( tribe_get_custom_field( 'Tickets' ) ); $contesturl = esc_url( tribe_get_custom_field( 'Contest' ) ); $rsvpurl = esc_url( tribe_get_custom_field( ‘RSVP’ ) );<?php if ( tribe_get_custom_field( 'Tickets' ) ): ?> <strong><a class="fasc-button fasc-size-xsmall fasc-type-flat" style="background-color: #cccccc; color: #000000;" href="<?php echo $ticketurl ?>" target="_blank" data-fasc-style="background-color:#cccccc;color:#000000;">Get Tickets</a></strong> <?php endif; ?> <?php if ( tribe_get_custom_field( 'Contest' ) ): ?> <strong><a class="fasc-button fasc-size-xsmall fasc-type-flat" style="background-color: #cccccc; color: #000000;" href="<?php echo $contesturl ?>" target="_blank" data-fasc-style="background-color:#cccccc;color:#000000;">Enter to Win</a></strong> <?php endif; ?> <?php if ( tribe_get_custom_field( ‘RSVP’ ) ): ?> <strong><a class="fasc-button fasc-size-xsmall fasc-type-flat" style="background-color: #cccccc; color: #000000;" href="<?php echo $rsvpurl ?>" target="_blank" data-fasc-style="background-color:#cccccc;color:#000000;">RSVP</a></strong> <?php endif; ?>And if you visit http://orsvp.com/event/tokio-hotel-feel-it-all-world-tour-2015-part-2-the-club-experience/ you’ll see that the Ticket button works and if you scroll to the bottom you’ll see the Other field for RSVP displays and shows the content of it.
mnussbaum
Participant$ticketurl = esc_url( tribe_get_custom_field( 'Tickets' ) ); $contesturl = esc_url( tribe_get_custom_field( 'Contest' ) ); $rsvpurl = esc_url( tribe_get_custom_field( ‘RSVP’ ) );` <?php if ( tribe_get_custom_field( ‘Tickets’ ) ): ?>
” target=”_blank” data-fasc-style=”background-color:#cccccc;color:#000000;”>Get Tickets
<?php endif; ?><?php if ( tribe_get_custom_field( ‘Contest’ ) ): ?>
” target=”_blank” data-fasc-style=”background-color:#cccccc;color:#000000;”>Enter to Win
<?php endif; ?><?php if ( tribe_get_custom_field( ‘RSVP’ ) ): ?>
” target=”_blank” data-fasc-style=”background-color:#cccccc;color:#000000;”>RSVP
<?php endif; ?>’mnussbaum
ParticipantI literally just copied and pasted the same code I used for the Tickets and Contest replacing them with RSVP which matched the name of the additional field and nothing gets pulled in.
mnussbaum
ParticipantWe are using the most recent versions of WordPress, The Events Calendar, and Events Calendar PRO.
With plugins deactivated the events still were not showing on the home page.
In the past I believe we used some kind of custom code for a loop that pulled in the most recently added events and displayed them through a Category widget. This may have coupled with the Events Rocket plugin, I do not recall.
Are you either aware of any such code out in the wild, or are you able to provide some support? We’d love to be able to list the recently added events so people can see what’s new to the calendar.
mnussbaum
ParticipantThat was it. Thank you!
mnussbaum
ParticipantIt only takes up the full available width when I use a wide image. Sometimes the image is tall and does not fill the entire width of the single event page and aligns to the left.
Here’s an example: http://orsvp.com/event/emo-night-brooklyn-round-3/
mnussbaum
ParticipantSorry, I actually meant in the actual single event view, not the list view.
mnussbaum
ParticipantNever mind, I seem to have resolved the issue myself! Thanks for the help, Brian!
mnussbaum
ParticipantSorry, I was editing a couple of things and didn’t c/p the correct code. The $contest in the bottom set of code should be $contesturl.
mnussbaum
ParticipantHey Brian, thanks for the response!
I actually tried another more complicated method that worked for part of what I was trying to do but I’ll try that one as it’s less code.
I am having an issue however, and it is hopefully an easy fix. I have two additional fields I need to pull in for this. One is called Tickets and one is called Contest. The code below works perfectly for the ticket field, but it does not pull in the data for the contest field. Can you take a look and see what I might need to do to get the data from both fields so I can check that they are not null and create a button for each one that exists?
Thanks!
$ticketurl = esc_url( tribe_get_custom_field( 'Tickets' ) ); $contesturl = esc_url( tribe_get_custom_field( ‘Contest’ ) );<?php if ($ticketurl != null): ?> <span class="tribe-events-divider">|</span> <span class="tribe-events-cost"> <strong><a class="fasc-button fasc-size-xsmall fasc-type-flat" style="background-color: #cccccc; color: #000000;" href="<?php echo $ticketurl ?>" target="_blank" data-fasc-style="background-color:#cccccc;color:#000000;">Get Tickets</a></strong> <?php endif; ?> <?php if ($contest != null): ?> <span class="tribe-events-divider">|</span> <span class="tribe-events-cost"> <strong><a class="fasc-button fasc-size-xsmall fasc-type-flat" style="background-color: #cccccc; color: #000000;" href="<?php echo $contest ) ) ?>" target="_blank" data-fasc-style="background-color:#cccccc;color:#000000;">Enter to Win</a></strong></span> <?php endif; ?>mnussbaum
ParticipantQuick update to my question that may change the answer:
I am using 2 custom fields, one called Tickets and one called Contest.
Each one creates a button, one that says Buy Tickets and one that says Enter to Win.
I need each of them to have individual if statements to determine if their respective values exist.
Thanks!
<strong><a class="fasc-button fasc-size-xsmall fasc-type-flat" style="background-color: #cccccc; color: #000000;" href="<?php echo esc_url( tribe_get_custom_field( 'Tickets' ) ) ?>" target="_blank" data-fasc-style="background-color:#cccccc;color:#000000;">Buy Tickets</a></strong> <strong><a class="fasc-button fasc-size-xsmall fasc-type-flat" style="background-color: #cccccc; color: #000000;" href="<?php echo esc_url( tribe_get_custom_field( ‘Contest’ ) ) ?>" target="_blank" data-fasc-style="background-color:#cccccc;color:#000000;">Enter to Win</a></strong> -
AuthorPosts
