Support

Account

Home Forums General Issues How to add an anchor link with Advanced Custom Fields Reply To: How to add an anchor link with Advanced Custom Fields

  • I’d look at your code for where you’re spitting out the ACF field value for the div ID. In your non-working example, it’s just showing it standalone vs. as the ID so, your example in the source is:

    <div id="" style="display: none;">
        #baddog
    <div class="flavors">
    <div class="flavorsleft">
        <picture>
    <source type="image/webp" srcset="https://headley.tfm-dev.com/wp-content/uploads/2023/01/baddog-1.png.webp"/>
    <img src="https://headley.tfm-dev.com/wp-content/uploads/2023/01/baddog-1.png" alt=""/>
    </picture>
    
    </div>

    And where #baddog is, that should be spit out in the ID field instead. If you post the code for your template itself, may be easier to identify the error but that’s definitely what is causing it to not work. It should be:

    <div id="baddog" style="display: none;">
    <div class="flavors">
    <div class="flavorsleft">
        <picture>
    <source type="image/webp" srcset="https://headley.tfm-dev.com/wp-content/uploads/2023/01/baddog-1.png.webp"/>
    <img src="https://headley.tfm-dev.com/wp-content/uploads/2023/01/baddog-1.png" alt=""/>
    </picture>
    
    </div>