Case Study 1
Let’s look quickly at the Influencer Demo, where Dynamic Content has been added to the blog posts. As we can see here at the top of a blog post there are actually three areas with dynamic content.
The top row is actually a Nested Column Element with a 1/4 – 1/2 – 1/4 layout. In the first column, where we can see the Date, there is a Text Block Element, the content of which is pulling the Post Date. The column next to that is also a Text Block Element, which is pulling from the Post Terms Dynamic Content Type, and is showing Categories. And finally, the large image is the blog post’s featured image, inserted as dynamic content. Let’s have a look at the back end to see how this has been achieved.
To add the first area of Dynamic Content, a Text Block Element was used. See below how the Content Area of the Text Block Element has a Database Icon, denoting that Dynamic Content can be used for that option.
As we can see in the screenshot below, the Post Date Dynamic Content Type was chosen, and the Post Published date format was chosen to display. The Format option also controls how the date displays on the post.
For the second area of dynamic content, another text block was added, and the Post Terms Type of Dynamic Content was selected, with the taxonomy of Categories. The Separator field was also filled in to control how the various categories are separated on the post. Note how there in an option for the categories to link to a term page, and also fields for Before and After text. This would be static text that would display before or after the dynamically generated content.
For the image on the post, the Featured Image Dynamic Content type was selected. There are no other Dynamic Content Types for the image field here, but as mentioned earlier, if ACF was installed and an image type registered, that would also show up here.
The beauty with this setup, apart from the fact the content will automatically update if the featured image was changed, or for instance, further categories were added, is that this post content could also be replicated on another post. Then, only the actual post content below the featured image would need to be edited, as the Post Title is being pulled automically with the Page Titlebar, and the date, categories and featured image would all be pulled directly from the new post.
If we look at the back end of the post, we can easily see where this dynamic content is coming from. The post date and time section, the categories and the featured image set here will all automatically show on the page if edited. Also the tags section, while not used in this post, could also be a dynamic content area.