• Resolved maxstabile

    (@maxstabile)


    Hello, is there any way to use the ACF plugin in defining where the blocks should appear? For example, I want to add a custom field for management if a certain post alludes to some specific product and then assign that product in the ad-inserter instead of using category (too broad) or tags (a possibility, but difficult to maintain a multi-person management) I would use that custom field.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Spacetime

    (@spacetime)

    Hello,

    Not sure if I understand your question.
    Each Ad Inserter block has many settings to define insertion position:
    https://adinserter.pro/documentation/automatic-insertion

    You can also define conditions for insertion:
    https://adinserter.pro/documentation/black-and-white-lists

    And you can use shortcodes, widgets or PHP functions for manual insertion:
    https://adinserter.pro/documentation/manual-insertion

    Thread Starter maxstabile

    (@maxstabile)

    Hi, thanks for the quick reply!
    I will try to be more precise.

    I want to create a custom field that will display the list of courses for sale in my e-commerce. My idea is to make this custom field menu where in each post the marketing team could mark which course or course area that post refers to. I already know how to do this with ACF. But I don’t know if there is a possibility in ad-inserter to add the custom field as display criteria.

    I know I could do it with tags. But, having a single choice dropdown would help me to have more control.

    Thanks in advance for the answer!

    Translated with http://www.DeepL.com/Translator (free version)

    Plugin Author Spacetime

    (@spacetime)

    OK, if I uderstant your question correctly you would like to check custom field value in Ad Inserter – as the condition for the insertion.

    You can do this with a simple PHP code – of course, this is server-side check:

    <?php
    $acf_value = get_field ("your_field" );
    if ($acf_value == '') {
    ?>
    
    AD CODE
    
    <?php
    }
    ?>
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Using Advanced Custom Fields’ is closed to new replies.