Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAndrew Folts
14,238 PointsCan you style Custom Fields in the Wordpress page editor?
Advanced Custom Fields just adds fields in a list to a Wordpress page editor. But is there a way to add a few styles to the page editor admin area?
For example, it would be nice if I could increase the margin between Field Groups, so it's more readable and organized for clients editing contentβand doesn't just look like a long list.
1 Answer
Alexandre Babeanu
10,947 PointsI've actually never tried this but it seems you can hook your own css styles for the backend in functions.php
//function to enqueue stylesheet
function admin_css() {
$admin_handle = 'admin_css';
$admin_stylesheet = get_template_directory_uri() . '/css/admin.css';
wp_enqueue_style( $admin_handle, $admin_stylesheet );
}
// hook to add stylesheet
add_action('admin_print_styles', 'admin_css', 11 );
then just add your styleheet in your them folder's css directory.
cheers
Alex