plugins - Programmatically generate new pages for a site based on page template and content elements accessed via DB

I 'd like toprogrammatically generate new pages for a site - the textual and visual components of the content are

I 'd like to programmatically generate new pages for a site - the textual and visual components of the content are stored in a DB, this includes the names for the different locations the pages are for, links to the location specific images and custom description text.

My first attempt would be to code a template for the page the way I want it to look like with the different sections, elements etc and then retrieve the relevant content for each page from the DB (by using the corresponding reference names for the elements as defined in the template)and send it to wordpress (with a post request to the rest api presumably)

(This is a data analyst's attempt to automate a web development process.)

1) Is the above process feasible and meaningful ? (in theory)

2)Are there any plugins or instructions that would facilitate this (in practice) especially without reinventing the wheel ?

Clarification: The use case is the equivalent of having a list of hotels and locations and corresponding images and content in a DB (I haven't created that yet and it could be anything from an online spreadsheet to some storage service on the cloud - anything that can let me programmatically access the data.) The goal is that then if I want to add say a 100 new locations and create the corresponding pages I can do it instantly

I 'd like to programmatically generate new pages for a site - the textual and visual components of the content are stored in a DB, this includes the names for the different locations the pages are for, links to the location specific images and custom description text.

My first attempt would be to code a template for the page the way I want it to look like with the different sections, elements etc and then retrieve the relevant content for each page from the DB (by using the corresponding reference names for the elements as defined in the template)and send it to wordpress (with a post request to the rest api presumably)

(This is a data analyst's attempt to automate a web development process.)

1) Is the above process feasible and meaningful ? (in theory)

2)Are there any plugins or instructions that would facilitate this (in practice) especially without reinventing the wheel ?

Clarification: The use case is the equivalent of having a list of hotels and locations and corresponding images and content in a DB (I haven't created that yet and it could be anything from an online spreadsheet to some storage service on the cloud - anything that can let me programmatically access the data.) The goal is that then if I want to add say a 100 new locations and create the corresponding pages I can do it instantly

Share Improve this question edited Sep 10, 2019 at 13:10 Alexandros Papageorgiou asked Sep 10, 2019 at 10:29 Alexandros PapageorgiouAlexandros Papageorgiou 11 bronze badge 2
  • Can you provide some context? What problem are you trying to solve by doing this? Is this an initial setup process? You mentioned a database, what is this DB? It's unclear – Tom J Nowell Commented Sep 10, 2019 at 10:59
  • 1 some context added as you suggested @TomJNowell – Alexandros Papageorgiou Commented Sep 10, 2019 at 15:58
Add a comment  | 

1 Answer 1

Reset to default 0

Sounds like you'd just be able to make a custom post type in WordPress, a page template that displays that post type, and then import new content at will.

If you will be importing large datasets and need pages created on the fly, you can probably use an importer plugin for that: http://www.wpallimport/

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745166781a4614682.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信