• Resolved bluedogranch

    (@bluedogranch)


    Hi,

    Great plugin! Very useful.

    One question: is it possible with custom CSS or jQuery to hide the field label .acf-label when all fields are collapsed? And then show again when expanded? Could I use CSS or jQuery on fields with -collapsed-target?

    I.e, in the image, https://ibb.co/vzWyd2F I want to hide “Winner Year and Writer/Illustrator”. The label is repetitive and not needed, at least for me.

    Thanks for any ideas.

    • This topic was modified 1 year, 3 months ago by bluedogranch.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author dreihochzwo

    (@tmconnect)

    That’s possible with a little CSS. Add this to your (child) theme functions.php

    add_action('admin_head', 'my_admin_css');
    
    function my_admin_css() {
      echo '<style>
        .acf-row.-collapsed .acf-label {
          display: none;
        } 
      </style>';
    }
    Thread Starter bluedogranch

    (@bluedogranch)

    Thanks! I ended up using the more specific ACF hook:

    function my_acf_admin_head() {
    ?>
    
    <style>
    .acf-row.-collapsed .acf-label {
    display: none;
    } <style>
    
    <?php
    }
    add_action('acf/input/admin_head', 'my_acf_admin_head');
    
    

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide .acf-label when all collapsed’ is closed to new replies.