If you are a WordPress beginner you might find this Useful so let Us help you Master a useful tool that can minimize tones of Time in your WordPress development journey, in doing so this will help you create stunning themes that are easy to customize and backend use.
- Understanding of WordPress theme structure (underscore)
- Friendly with HTML & CSS
- Able to edit your WordPress codes in a text editor
- Custom Fields plugins
- Knowledge of PHP
Flexible content Is more similar to the Repeater fields but its differs with it as the flexible content Adds a new row layout. One layout allows you to create more fields of your choice depending on your design or Complex flexible content layouts. This is more useful as they can be reused in different page sections and Other pages.
After installing your Advanced Custom Fields Plugin Start by creating your first custom field as in Example shown below =>
Now within this Flexible content, you can create anything you want to display according to your development But in my case, I want to display service that My company offer’s
In order to display more than one identical post like this, you will need to create
REPEATER FIELD CONTENTS:
You will need to add A layout Name and the label the Fields as shown below
In order to post more than one post in the same layout, you will need to create a repeater field
After setting up your custom field Then you can be able to display fields in your templates but I would advise you creating a ”block-Content” file when you can keep all your Block Layout.
where you can always call the flexible container in the page that you want by using this snippet :
if( have_rows('flexible_content_field_name')): while(have_rows('flexible_content_field_name')): the_row(); get_template_part('template-parts/content-blocks/block-' . get_row_layout() ); endwhile; endif;
Lastly, style your content to meet your design.