Support

Account

Home Forums Front-end Issues ACF and WordPress calendar

Solved

ACF and WordPress calendar

  • I think this is the place to ask, if not please move the thread.

    I need to know if I can make the WordPress calendar show posts with a ‘date’ custom field (I guess using the_field() function) instead of querying WordPress’ the_date() and then map their coordinates in the Google Map (I’m using Geo Mashup plugin and I’m currently mapping coordinates). I’ve been searching a similar solution but no cigar. Please ask me for any info, code, etc that I can provide.

    If possible, how would you approach this problem?

  • Hi @individual

    Sorry, but you are asking too many questions for me to help out.
    I am not familiar with “the WordPress calendar”

    As for the “map their coordinates in the Google Map “, this is something you can read about on the ACF google map documentation page.

    I am not familiar with the Geo Mashup plugin and can’t provide support for this compatibility.

    I think you need to break up your task into small achievable milestones and then ask specific questions to the relevant developer. For instance, I can help you with any ACF related code, but if you are using a calendar plugin, you will need to ask them how you can modify the query to use a custom field as the sort order.

    Thanks
    E

  • I forgot that I’ve solved this. sorry. I’m using The Events Calendar plugin for WordPress.

    1) In your theme folder, create this hierarchy:
    [theme folder]/tribe-events/month/ and copy single-event.php from wp-content/plugins/the-events-calendar/views/month/
    2) Create a Relation field that connects the Calendar event to a WordPress post (I call it relatedevent)
    3) Locate this code and `<div id=”tribe-events-event-<?php echo $event_id ?>” class=”<?php tribe_events_event_classes() ?>”><h3 class=”tribe-events-month-event-title summary uk-text-center”><a href=”<?php the_field(‘relatedevent’); ?>” class=”url”><?php the_title() ?></a></h3>
    </div>`

    Now everytime you click on an event inside the calendar, it will send you to the WordPress post, not the Calendar event.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘ACF and WordPress calendar’ is closed to new replies.