• Is it possible to have WP pages inside of a sub-directory in your themes folder? If so, how do you go about it? I tried a little test a bit ago, putting a single template page inside of a subfolder. But the template wasn’t recognized in the dashboard.

    I’ve never had the need to do this before, so I never really thought about it. : ) But, I’m working on a project now that may require it, so before I go down that road, I want to know if it’s even possible. In fact, it may end up being, at times, two directories deep.

    I appreciate any help! Thanks in advance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Is it possible to have WP pages inside of a sub-directory in your themes folder?

    I think perhaps you’re confused as to how WordPress works and what the theme files do. The latter governs how pages are displayed and, occasionally, adds a bit of extra functionality. WordPress itself handles all of the architecture of the site (eg defining what pages are children of another page etc) via the database. It doesn’t actually ‘store’ the different pages in different sub-directories. It’s stores the relationships between pages.

    If you want to have different site sub-sections using WordPress pages, create a top-level, parent, Page for each section that you want to display on the site. Then create new pages as children of each of these parents as appropriate. That establishes the parent-child relationship that you’re currently thinking of in terms of ‘directory-subdirectory’.

    You can extend this process to create parent > child > grandchild > great grandchild if you want. Different approach than perhaps you’re used to but the same end result.

    How your parent/children/grandchildren menus are displayed will be down to what theme you use and what plugins/widgets you might also use.

    Hope that helps.

    Thread Starter Kate

    (@katendarcy)

    I apprecitate the info, but maybe I just wasn’t clear enough. I understand how pages work, at least I hope I do! : ) But, the issue is that there’s a directory, (directory x), currently sitting on the same level as the WP installation. I was hoping to move it into the WP folder and integrate its current PHP pages into WP pages, while keeping all of the files inside folder x. There are a lot of files inside of it, and I didn’t want things to get too messy being all inside one folder. It may not be possible, I guess I was just curious if anyone had any thoughts on it.

    I certainly appreciate your feedback, though! ; )

    Oh – sorry. My mistake! ??

    If these other pages are standalone php files, I don’t see how you can ‘integrate’ them into WP beyond hardcoding links that point to them. How exactly to do you want to use them with WordPress?

    Thread Starter Kate

    (@katendarcy)

    No worries. As I said, I appreciate the help. : )

    It’s actually for a client of mine, and I’m trying to import a PHP app into WP because he wants to be able to use the WP header, footer, and sidebar, as well as having it styled the same way as his current theme. (Right now they look similar, but not the same.)

    My thought was to make each of them individual pages, based on a template name I’d give each one. Make sense?

    I’m not saying that’s the best way to do it, it’s just what I was thinking. I’m far from an expert in WordPress, obviously! But, I’ve been working with it for a while now and have a decent grasp on it. So if you or anyone else has any other ideas, I’m open to hearing them!

    Thanks again!

    What’s the PHP app you want to use?

    Other than grabbing the output of the WP header, footer and sidebar and hardcoding them as php includes for your app, I don’t see how to integrate those files. And that’s hardly ideal. Still leaves 2 sets of files that you have to remember to make changes across.

    So I was wondering if there was a way of integrating your app into WP instead of trying to do it the other way around. Have you looked at plugins like Inline PHP, PHP Code Widget or runPHP? Is anything like that going to be useful?

    Thread Starter Kate

    (@katendarcy)

    For confidentiality reasons, I can’t say what the app is, but it’s custom.

    I am trying to integrate it into WP. At least, I thought I was! : )

    I had also thought of doing a separate install of WP inside directory x, but that would also leave you with two places to update files.

    I’ll take a look at the links you mentioned. Thanks again!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Is it possible to have pages inside of a sub-directory in your theme folder?’ is closed to new replies.