Support

Account

Forum Replies Created

  • @jannej

    I’m currently searching for a solution to a similar issue. My problem is specifically the <br> and <br /> tags. They are still in my WYSIWYG editor on the admin side, but do not render on the page 100% of the time. I’ll post up here if I find something that helps.

  • This wound up being a problem for me that was not caused by ACF. My issue was the ridiculous caching that is going on with my site. We are using Pantheon, the Pantheon caching Varnish, and then WP Supercache for our CDN. I have resolved my issue and I hope that it may help someone else in the future.

  • This is guess, but I think I know what you are looking for.

    
    <?php $bg_color = get_sub_field('div_background_color'); ?>
    <div style="background-color:<?php echo $bg_color; ?>">
    <!-- content -->
    </div>
    
    

    Further down the page in your other layout you would just need to <?php echo $bg_color; ?> in the bg style declaration.

    Let me know if I am way off base with your request, but I’m hoping I got it right 🙂

  • Here was a simple solution that I came up with for a single checkbox. My use is to declare a title to be echoed as an <h2> or <h3> tag in the html. I post this for anyone else looking for an easy way to use a single checkbox.

    
    if($h3 = get_sub_field('h3_option')){
    
                                            echo "<h3>{$title}</h3>";
                                    } else {
    
                                            echo "<h2>{$title}</h2>";
                                    }
    

    I tried the “basic logic” option in on this page: https://www.advancedcustomfields.com/resources/checkbox/

    <?php 
    
    $selected = get_field('field_name');
    
    if( in_array('red', $selected) ) {
    	
    	echo 'Red was selected!';
    	
    }
    
    ?>

    But I found it unnecessary for my single selection.

    Do note the “get_field” and “get_sub_field” difference in the 2 examples.

    I am using sub_field because we are using the flex content. Big difference for those just getting to know this plugin.

  • I am running in to this same issue.

    I’m running WP version 4.5 and ACF Pro version 5.3.7

    I am going to troubleshoot this further this evening and will check back in with you, but I’m curious if you could save me some time with a fix that has already been discovered.

    My scenario:

    I have a page template set up with custom fields and all is well. I need to change content headers from static text to editable fields. I create new fields in my field group and save. The new fields are present in my field group and everything looks fine.

    The new fields do not show up in my page template in the page editor for existing pages or new pages. I have flushed the cache, tried activating the parent theme and then the child theme again, nothing seems to reset the field group and show my new fields.

    I don’t have much content using this field group so I could re-create the group and move forward, but I shouldn’t have to. Is there a reason that field groups that are already in use will not update when modified?

    I’ll check back in later this evening with a solution…or more questions.

    Thank you for all you do! This plugin is awesome 🙂

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