Support

Account

Forum Replies Created

  • By default images are returned as an array.

    You need to either change this to URL, or else you can pull the details from the array to get the URL, eg:

    
    <?php
    $image = get_field('ac_imagem_destaque');
    if( $image): 
       $alt = $image['alt'];		
       $thumb = $image['url'];
       $width = $image['width'];
       $height = $image['height'];
       ?>
    
       <img src="<?php echo $thumb; ?>" alt="<?php echo $alt; ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>" class="thumb_285_350" />
    										
    <?php endif; ?>
    

    You can read more here – http://www.advancedcustomfields.com/resources/image/

  • Could you just put in a conditional message with a URL link to the options page?

  • 
    //ENABLE ACF OPTIONS AND CREATE SITE SETTINGS OPTIONS PAGE
    if(function_exists('acf_add_options_page')) { 
    	acf_add_options_page();
    	acf_add_options_sub_page('Theme Settings');
            acf_add_options_sub_page('Header');
            acf_add_options_sub_page('Content');
            acf_add_options_sub_page('Footer');
    }
    
  • A better way to do what you want would be to setup the work as a custom post type in wordpress.

  • Assuming your value is coming from a checkbox in ACF called ‘choices’, you can just get the value using get_field/get_sub_field.

  • A better way might be to use a Custom Post Type called Movies, and then use ACF to setup the values inside each custom entry.

  • What problem exactly are you having?

  • Do you mean you want to have a single setting applying to all fields in the repeater that is the same?

    Couldn’t you just a set a value outside of the repeater and use this external variable inside your repeater loop?

    If you want the option to override the setting on each individual repeater, you could have a boolean for this and check for that first before using the other value.

    I often do this with a tab called ‘Advanced Settings’ to make things a bit easier for the user too.

  • The ‘file_link’ is using the_field(); instead of the_sub_field();

  • Just tried using:

    $field_key = "field_54289c0d8173b";
    $field = get_field_object($field_key);
    print_r($field);

    Where the key is the feature_image field.

    This resulted in an array output outside of the YARRP template, but in the template the variable was blank.

  • Some additional details to this issue:

    On top of the image problem. It would seem that the code is ignoring some of the settings from ACF data. Another example is a TEXT AREA field that, instead of following the ‘automatically add paragraphs’ is just outputting br tags.

    That being said, when I pull the data from inside the flex content (in the case of the image), that actually does correctly pull the image.

    Could the problem lie in the use of ‘get_field’/’the_field’ with YARRP somehow?

  • Unfortunately I’ve updated all my sites already that are using links and fixed the issue so I can’t really replicate it easily.

    I might have some old staging sites somewhere that I can still try it on, but I don’t think so.

    Thanks anyway!

  • Hey Elliot, I explained that pretty poorly, sorry.

    The issue is that after updating to PRO (or possibly from 1.0 to 1.1) all the link fields basically were allowing no types of posts except ‘archive’ (so not allowing post, page, or media). Previously they were set to allow everything.

    When you create a new link field in the latest version it shows placeholder text:

    Filter by Post Type : All Post Types

    In my case, it had no placeholder text or anything selected at all.

    I had to go through each field and add a filter (like page, post, media, etc), save the change to the custom field set, then edit it again and remove these filters. After doing that it would then show the ‘all post types’ placeholder text and display all post types again.

    My assumption would be that in the switch to the Chosen plugin, the way that no filters was handled isn’t coming across properly, and so the filter is acting like there is a selection, but then returning a negative for everything (except archives, which doesn’t appear to be a filter option in the chosen field)

    Does that make more sense?

  • I can second the bug #2 on Windows 7 x64, chrome (last version). As I scroll through the options, some fields aren’t cleared when the going to the new selection.

  • Thanks Elliot,

    I did some run through in the support section and we came to the conclusion that the ‘file_list’ array was showing the ‘file_list_title’ as being empty.

    We came to the conclusion that this is in some way a limitation of memory or something. I tried increasing PHP settings to no avail, but just ended up rebuilding this to have two levels less repeaters and that seemed okay. Not sure exactly what limit was playing against me which is a bit frustrating.

    Thanks for your help!

Viewing 15 posts - 26 through 40 (of 40 total)