• Is it possible within WordPress’s system to have a web pages automatically constructed from a database table.

    For example, I start a website about book reviews. I create a database table on my site that has the required elements for WordPress along with, title, author, publisher, genre, book_cover, and review_text. I then have a template for how those are constructed into a post displaying each of those elements in the same way for each book. Is there a method within WordPress’s framework to support that design method?

Viewing 1 replies (of 1 total)
  • WordPress automatically generates all pages from the contents of its own database tables. To do this, it uses post types and taxonomies that define what URL looks like for which content.

    It is not intended to use individual database tables. Although this is also feasible, it is extremely time-consuming. You would have to define your own rewrite rules for your content, see: https://developer.www.ads-software.com/reference/functions/add_rewrite_rule/ and, based on this, an individual function that loads the content and uses a template for output. The result is a rather rigid construct with little leeway. You would also not be able to use SEO plugins or other extensions, as they are not aware of your individual development.

    The best way would therefore be to use the post types and taxonomies mentioned at the beginning. Register a post type for your content (see https://developer.www.ads-software.com/plugins/post-types/registering-custom-post-types/) and, if necessary, taxonomies. Then store your content in the WordPress backend in overviews that WordPress generates for you there. You can use permalinks to define the URL structure and other plugins may be able to help you optimize the output.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.