Support

Account

Home Forums Front-end Issues Trouble in displaying category link Reply To: Trouble in displaying category link

  • For radio button fields, you’ll need to add ['value'] or ['label'] after the variable to show either the value or label:

    
    <a href="<?php echo get_permalink( $shopid['value'] ); ?>" class="button">See</a>
    

    For testing, you’ll want to grab the object which will include the values and labels:

    
    <?php
    
    $shopid_obj = get_sub_field_object( 'cat_link' );
    var_dump($shopid_obj);
    
    ?>
    

    The above will spit out the array of your radio button field so you can see what’s there.

    See more here: https://www.advancedcustomfields.com/resources/radio-button/