Home Forums Backend Issues (wp-admin) background color of field group title


background color of field group title

  • Hello, I am new to WP and ACF PRO … I am a mobile developper but need a CMS for a new app, It looks like ACF can save me hughe time in development (with JSON API towards my app).

    I hope someone can give me an example how to change the background color of the acf-postbox title for a fieldgroup, both in closed state and when opened. I would like to make them green when closed and red when opened.

    I do find the css files, but in there I was looking for
    “postbox closed acf postbox” and “postbox acf-postbox” but it seems to be more complicated ?

    Thanks a lot for any help !

    .postbox.acf-postbox h2 {
       background-color: #0F0;
    .postbox.acf-postbox.closed h2 {
       background-color: #F00;
  • Edit : after clearing history in Firefox, it works !
    Thanks a lot John !


    Thank you John

    but it does not work 🙁
    I did add your code in acf-input.css just above /* mobile */

    But when I reload the admin edit action, no colors are visible.
    Do you have another idea, or did I put the code in the wrong place ?

    Thanks for your time !

  • I would most likely create a filter to run on ‘admin_head’ to add that to the admin pages or I would create a custom CSS style sheet and enqueue it in the admin and make it dependent on the ACF style sheet so that it loads later. Editing the core ACF style sheet means that you’ll need to make the same edit every time you update ACF.

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

The topic ‘background color of field group title’ is closed to new replies.