Support

Account

Forum Replies Created

  • Ok this somehow worked out but still having trouble with how to display the fields on the theme page!!

    How do I echo the image in the post page?

    
    function my_acf_load_field( $field )
    {
        // reset choices
        $field['choices'] = array();
    
        // load repeater from the options page
        if(get_field('teams', 'option'))
        {
            // loop through the repeater and use the sub fields "value" and "label"
            while(has_sub_field('teams', 'option'))
            {
                $value = get_sub_field('team_name');
                $label = get_sub_field('team_name');
                $team_logo = get_sub_field('team_logo');
    
                $field['choices'][ $value ] = $label;
            }
        }
    
        // Important: return the field
        return $field;
    }
    
    // v4.0.0 and above
    add_filter('acf/load_field/name=away_team', 'my_acf_load_field');
    add_filter('acf/load_field/name=home_team', 'my_acf_load_field');
    
    
  • okay it took me sometime but figured it out till the end

    I had to add the ‘option’ when calling for the image field

    <?php $attachment_id = get_sub_field(‘orbit_image’, ‘option’);

    🙂

  • Hey elliot I have to say the plugin is a real timesaver = )
    I love it..

    Anyway I’m also trying to make a price listing page and the thing is I want to know if it is possible to make something like this if i buy the repeater field add-on

    catgory 1
    -title -price 1
    -subcatgory 1
    –title –price 1
    –title –price 2
    catgory 2
    -title -price 1
    -title -price 2

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