WordPress.org

Ready to get started?Download WordPress

Forums

How to produce a sub-page-system in WordPress (1 post)

  1. SoN9ne
    Member
    Posted 1 year ago #

    I am currently new to WordPress development and I am developing a custom theme with a few custom post types and custom functionality. For the most part, it was pretty easy to find the information I need on the Internet and the codex. I am importing an older outdated system (proprietary) into WordPress and I would like to be able to keep all the sub-pages of this older system in WordPress to take advantage of some powerful features and plugins. I have almost everything complete but I am a little confused on how to produce a hierarchical order for custom post types.

    I have WordPress installed in a sub folder (wordpress) from the domain root. I have a front-page setup to show the themes front page which aggregates data from other systems. I was able to use add_rewrite_rule to get some pages working properly with clean URIs.

    My problem is: I have a few systems that are auto generated from a separate database. For simplicity I will call these systems services.

    I currently have 2 services and there will eventually be more. The issue I am having is that each service will need to have it's own page with it's own sub-pages.

    i.e.:
    (main page):
    domain.com/services/aims
    domain.com/services/rcm

    (sub-pages):
    domain.com/services/aims/list
    domain.com/services/aims/profile

    domain.com/services/rcm/list
    domain.com/services/rcm/profile

    Each system will be built using the same functionality. The list page will list vendors for each service while the profile page will show detailed information for each vendor.

    I also want to be able to post articles in each system as well.

    ie:
    domain.com/services/aims/articles/?(.+)?
    domain.com/services/rcm/articles/?(.+)?

    My question is this: Is this functionality possible in WordPress? I tried using custom post types to get the URI to work but I was not sure of how to implement the articles. I know I can use query_vars to show different page content and this will emulate what I am trying to do with list and profile but I cannot figure out how to allow for articles to be posted to each service. I would like to use the same files for the services instead of having to make new files every time a service is added.

    The desired effect I am going for is that each service has the ability to post content to itself to keep it organized, list vendors in a list page, and show the vendor details. I know I will need to have custom navigation added to the pages and I am sure this is the easy part.

    Does anyone know if this is possible? If so, which approach would be the most efficient?

    Thanks for any help you can shed on this subject. Also, sorry if the title is not good enough... I couldn't figure out how to explain it simply.

Topic Closed

This topic has been closed to new replies.

About this Topic