Support

Account

Home Forums General Issues ACF in Event Schedule plugin

Helping

ACF in Event Schedule plugin

  • Hi there,

    I need to add additional images next to post title, in this case decided to use ACF and add fields (image) into another plugin (Event Schedule). After I added fields in ACF I was trying to add some code from ACF documention however it doesnt work..

    P.S. Every post will have different images based on their type. You can choose it while you are editing specific post.

    In ACF field menu I chose to return format Image Array.

    Tried with all return formats: Image Array, Image URL and Image ID. As I understand plugin cant find the variable acf_name and the image source is left blank.

    I used this code in Event plugin:

    <div class=”wcs-class__meta”>
    <div class=”wcs-class__inner-flex”>
    <h3 class=”wcs-class__title” :title=”event.title” v-html=”event.title”></h3>

    // Using this code from ACF documentation

    <?php

    $acf_name= get_field(‘acf_name’);

    if( !empty($acf_name) ): ?>

    ” alt=”<?php echo $acf_name[‘alt’]; ?>” />

    <?php endif; ?>

    </div>
    </div>

  • I cannot read all of your code. But if ACF cannot display the field it is because you are on a post inside “The Loop” that corresponds to what you are attempting to get the field from. I don’t know anything about the plugin that you mention or what template file you’re attempting to modify, but your first step should be to ask the author of that plugin if you can add custom fields to their events and how where that information would be stored.

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

The topic ‘ACF in Event Schedule plugin’ is closed to new replies.