From the course: WordPress: Advanced Custom Fields

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Making your block look good

Making your block look good - WordPress Tutorial

From the course: WordPress: Advanced Custom Fields

Start my 1-month free trial

Making your block look good

- [Instructor] Before we test out our block on the WordPress Admin side, there's one more thing that we need to do, and that's make our block look good. We're going to add a little bit of CSS in line with our block template. You can grab this CSS from the content-fun-facts.php file in the exercise files. We'll copy this, and then we'll add it to our content-fun-facts.php file in our child theme. We're placing this CSS in line so that it automatically gets included in both the admin area, and on the front end whenever our block is displayed, and we're doing just a few things here. In the fun-facts class that is the wrapper for the entire block, we're adding a simple background color, a border, and some margin and paddings, and then we're also adding a bottom border for the heading four, to separate it from the description. So we'll save this file, and then we'll go to our WordPress admin. Here you can see the block editor, and we've created a page called Fun Facts. If we click on the…

Contents