Archived topic
Dynamic data and custome page
7 replies · Started by Wouter on April 21, 2022
Hello there,
I want to make a custom page where I can dynamically load data in from the database. But in this page I want to use the container, rasters and so forth. So for example: I copy the content page in a new child theme and in that new page I want to load in data from the database and use the generatepress blocks (so in html form, not in the admin section). This should be possible, but I can't find any documentation on this. Can anyone give me some direction where to look at and how this works in general?
Hi there,
you can use a Block Element - Content Template to create a block built dynamic template that can be applied to any Post ( or other post type ) you set in its Display Rules:
https://docs.generatepress.com/article/block-element-content-template/
Thanks for that.
How does this work with writing a custom page (html). So basically coding directly in the .php scripts. Is there documentation then on how to use the container, rasters and so forth?
What would be the benefit of using a HTML Page instead of using say a Custom Page Template ?
See here:
https://generatepress.com/forums/topic/creating-a-custom-page-template/#post-1875566
Maybe I don't understand it well enough yet, but I'm trying to figure out the following: I have a custom table in my database (not related to wordpress) and I want to load that data dynamically into the page. It has over 400+ records so I want to iterate through it and put it all in a container/raster.
Oh ok - thats not something i can really advise on as its out of our forum scope.
You're into SQL queries and other stuff, some examples of that here on stack exchange:
https://wordpress.stackexchange.com/a/365268
Definitely not a simple task, and you may want to seek a developer to assist you with it.
I see. Thank you David. Have a good day!
I did find this plugin its premium but may be what you need and be: