Support

Account

Home Forums Front-end Issues ACF in Event Schedule plugin

Unread

ACF in Event Schedule plugin

    • mantinis

    • September 28, 2019 at 1:49 am

    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>

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.