Data-Driven Content?
-
How to create a repeating section on a page where the content is controlled by a table or text-list? For example, a page of team-members or products.
I don’t want to MANUALLY create the repeating section for each item. I want each repeat to be automatically generated based on the data in a table or text-list.
-
This topic was modified 2 years, 7 months ago by
johnywhy.
-
This topic was modified 2 years, 7 months ago by
-
There are plugins for that. https://ww.wp.xz.cn/plugins/search/team and https://ww.wp.xz.cn/plugins/search/products
Thx, @sterndata. You’re encouraging me to search plugins. That’s cool!
Altho’, your suggested search-terms (“team” and “products”) aren’t related to my question at all.
More relevant terms are “repeating block patterns”. With that, i found
https://ww.wp.xz.cn/plugins/superb-blocks/
It’s not apparent that would support my request.
Now i’m searching “data blocks”.
Does WP’s native block system natively support data-driven, repeating elements/blocks? I looked at the Table block, but i didn’t see any way to connect it to a data-source. Generally, i always prefer using native features, before installing a plugin.
It would be great if there was a way to use backend data to feed any parameter of any kind of block.
Thx!
I have no idea about whether there are “data driven” blocks; you’d need to check plugins to see which might have such blocks.
Perhaps someone out there knows π
“Repeater Field” seems to be the common name for this.
Pods Repeater plugin might work.
I would probably suggest using relationships to display the content, or at the very least separate the content into post types or a reusable block that you maintain. Repeatable field groups can be unwieldy to template. You could also try something like TablePress or others out there to embed lists of things.
Thanks, @sc0ttkclark . What do you mean by “relationships”? Do you mean, between post-types?
-
This reply was modified 2 years, 7 months ago by
johnywhy.
If you only want to list content that relates to the current context/page, that’s what I meant.
I thought you meant, between post-types.
Can you be a little more specific?
If you only want to list content that relates to the current context/page, thatβs what I meant.
@sc0ttkclarkexample of “content”?
Looks like you just want to manage a list of products or team members. Those could be a custom post type and then you can use the block editor to list them using the Query Loop block which lets you lay out the titles/content however you’d like.
I meant relationships here as in — if you needed repeatable fields, sometimes those things are related to the current page and for custom post type use-cases where you have a need for repeatable fields on those — sometimes the best data structure for that content is better suited as a relationship from one to the other.
But for your use-case, I think custom post type for team members with the Query Loop block would be best.
But for your use-case, I think custom post type for team members with the Query Loop block would be best.
@sc0ttkclarkQuery Loop block is the Answer!
thx!
-
This reply was modified 2 years, 7 months ago by
johnywhy.
-
This reply was modified 2 years, 7 months ago by
The topic ‘Data-Driven Content?’ is closed to new replies.