Support

Account

Forum Replies Created

  • Elliot has pointed me in this direction before for a similar issue.
    If you pass the custom field through the_content filter, it should then kick in.

    Here is the example provided to me before:

    $value = get_field('wysiwyg_field_name');
    echo apply_filters('the_content', $value);
  • This looks to be more a question about editing TinyMCE, the editor that powers the WordPress WYSIWYG.

    There are a number of plugins that can do what you need, here is one as a starting point:

    https://wordpress.org/plugins/tinymce-advanced/

  • Sure thing. I’d probably tackle it like this:

    In your example you should only need to create one CSS class.
    One for floating right. (Of course, you could make another for floating left and so on depending on your needs).

    .acf-pull-right {
    clear: none !important;
    float: right !important;
    }

    Here I’m forcing them to float to the right, and to ensure they stack I’ve forced them to stop trying to clear other objects.

    Add the class to the three custom fields that you want to stack up. I’ve mocked it up in browser as per the screenshot, doing a quick copy of the fields you’ve shown in yours.

    All you’d need to do is create the stylesheet then and enqueue it using the methods in the link on my previous comment.

    ACF Demo

  • I think I agree with your thoughts.

    I don’t think using the new width option will allow the layout to display quite like your mockup.

  • It’s probably not at first obvious, but the Radio field type is just a normal select field type. That’s probably why there isn’t separate documentation for it. The only difference between the two (Radio vs. Select) being that Radio only allows one choice (and at least one thing must be chosen). They should still work the same.

    This will display your choice:
    <?php the_field('example'); ?>
    This will display the possible choices:
    <?php echo implode(', ', get_field_object('example')[choices]); ?>

    If you head on over to the select documentation, the examples should get you going.

  • Oh I see, a unique identifier. That does sound like a bespoke field type is the best bet.

  • Do you mean the Field Key?

    If so you could use
    get_field_object instead of the normal get_field.

    For example, this will display all related information from our field:

    <?php $myfieldname = get_field_object(myfieldname); ?>
    <pre><?php print_r($myfieldname) ?></pre>

    And this will display the Field Key from the above:
    <?php echo $text[key]; ?>

    We can skip all the above and do it in one line, on it’s own like this:
    <?php echo get_field_object('text')[key]; ?>

  • Doing some extensive testing on the above, I believe the issues is not ACF but part of the theme interfering which just coincided with the latest update.

  • The problem lies with the Custom Field / Shortcode combo you’ve crafted. The other fields are working fine and are not part of the issue.

    Let’s assume stadium_slider is a ‘Gallery Field’, look at the Gallery Field Docs here.

    The bottom example pretty much shows exactly what you’re attempting.

    <?php 
    $image_ids = get_field('gallery', false, false);
    $shortcode = '[gallery ids="' . implode(',', $image_ids) . '"]';
    echo do_shortcode( $shortcode );
    ?>

    Use this example code, replace get_field('gallery', false, false); with get_field('stadium_slider', false, false);.
    This should dump a basic WordPress gallery with the images that have been selected in the back end.

    Now we need Owl Carousel to take over. According to the owl-carousel plugin, there should be a setting to override the default galleries with it instead, take a look in it’s settings for something that sounds like this.

    Find this setting and you are away.

    A good help would be to turn on debug mode if you haven’t already in wp-config. If the code is already there, set it to true like so.

    define( 'WP_DEBUG', true );

    Hope this helps!

  • The ‘Message’ Custom Field type will do exactly what you want.

    Add one to your Field Group under the new tab, and paste the HTML directly into the container there.

  • Yeah, mine is still crashing.
    I have a single relationship custom field in my example post.

  • Adding myself to the above, same issue is being encountered.
    Local development site, WP 4.0, ACF PRO 5.1.1.

    This only appears to happen when updating or publishing a post.

    Warning: hash_equals(): Expected user_string to be a string, integer given in /...../wp-includes/pluggable.php on line 1719
    
    Warning: hash_equals(): Expected user_string to be a string, integer given in /...../wp-includes/pluggable.php on line 1725
    
    Warning: Cannot modify header information - headers already sent by (output started at /...../wp-includes/pluggable.php:1719) in /...../wp-admin/post.php on line 233
    
    Warning: Cannot modify header information - headers already sent by (output started at /...../wp-includes/pluggable.php:1719) in /...../wp-includes/pluggable.php on line 1173
  • I added this to my functions file, and replaced the placeholder with my wysiwyg field name.

    Just to confirm, I’ve tried this out and it works.
    Thanks Elliot!

  • Damn that’s a shame. I thought this could be the case.

    I would love the ability for my users to hide a large field when it’s not being edited in the Repeater (via checkbox / logic as above, or even just the ability to collapse to just the field’s name).

    It’s so close to being perfect for my requirements!
    Maybe I should add this as a feature request…

    Thanks Elliot.

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