The ACF plugin is needed to create and display additional fields for articles. For example, we need to add the color field to articles and display it in the template.
The procedure is standard: go to Plugins – Add new – search for ACF (Advanced Custom Fields), install and activate. The Field groups section will appear on the left – there we create a group of fields and a new field (there are a lot of flexible options inside).
To display the color field in the template, we use the following construction:
<?php the_field('color');?>
In this example, instead of color, enter the name of your field.
Another solution that is often needed. If you need to display the ACF field only if this field is filled in the admin panel, then use the construction:
<?php if( get_field("color") ): ?> <?php the_field( "color" ); ?> <?php else :?> Custom text <?php endif; ?>