Support

Account

Forum Replies Created

  • Hi, yes John that is what I did. Sadly, the outcome is the same. Leaving the “myfield” untouched shows red, blue, yellow. But when I replaced it with “colors,” the output was blank.

    If I use a different name, like colorsX, it displays red, blue, yellow on the front-end.

  • Hi John,

    Pasting it as-is, gives an error:
    syntax error, unexpected variable “$values”, expecting “;”

    So, I put “;” on line 6
    return $value;

    It is still not showing an output when I replace myfield with colors. Leaving the “myfield” as it is displays an output of red, blue, yellow.

    Would it be much easier for you to see what causes this if I will give you access to my WP site?

  • Hi John. I don’t know if I did it as instructed. I replaced lines 3 and 4 with:
    $value = $field[‘value’];
    $values = array();

    The result is still the same, no output on the front-end.

    One thing I noticed is that WHATEVER value I put in the “myfield” the front-end will display the array format “red, blue, yellow.” Hence, changing it with the actual value “colors” do not produce an output.

    Thanks for your patience, Sir.

  • In the meantime, I am using the example value and Label like red : Red, blue : Blue, yellow : Yellow just to make sure that I don’t have any duplicate values or labels. Without that filter, the outcome is “red, blue, yellow”. But when I inserted the filter in functions.php, there was no output on the front-end.

    The value is added to the Edit/Post of WordPress. It is the current post (please see the image). And I am planning to use this field on every post on my website.

    ACF Filter

  • Hi Jonh,

    Thanks for the reply; I appreciate it.

    As I understand it, I included the code in the functions.php of the WP theme. Then, I replaced the “myfield” with the actual one, which is “rating_index” – from [acf field="rating_index"] shortcode.

    Doing so, no value is shown on the front-end. I may be doing it wrong. I am sorry; I am not a coder and rely only on WP and Plugins to build a website. Please understand.

    Russ

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