Now that you know how to display basic field types, you’re going to explore how to display something slightly more involved: the relational post object field type. In this video, learn how to get the information and loop through it.
- [Instructor] With HL being properly defined, … it's time to add the fields to our post-template. … To do that, we'll need to modify … the template that controls our single post output. … In the astra theme, that is a file called … content-single in the template parts folder. … We're going to need to recreate … that file structure exactly in our child theme. … We'll do that by copying the content-single.php template … and then going into our astra child theme, … adding a new folder called template-parts … and then pasting the file we just copied. … We'll close the astra template … so we don't confuse things … and then we'll scroll to around line 19, … which is astra_entry_content_single. … Here is where we'll add our custom code. … Just as a refresher, we have three custom fields … that we want to add to our template. … If we look in the name column of our field group, … we'll see the names that we need to grab: … profile_description, location, and friends. … First, let's add our location and profile description. …
- What are custom fields?
- Creating field groups
- Adding content to fields
- Displaying fields on a child theme
- Creating and displaying repeater fields
- Creating a submission form
- Creating a Gutenberg block with PHP only
- Writing rules for field display
- Organizing fields
- Exporting field groups
Skill Level Advanced
1. Getting Started with ACF
2. Creating Field Groups with ACF
Field types overview3m 48s
3. Displaying Your Fields
4. Working with Data in ACF
5. Creating a Gutenberg Block
6. Cleaning Up the Admin
Next steps1m 13s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.