Template/Theme/Tags and Structure question
Hi. I’ve just started using WordPress and I’m having a bit of trouble sifting through the Codex. So I’ve planned a structure for my static pages to be accessed through “www.site.com/contact”, “www.site.com/about”, and the like. I’m also trying to let these pages access the WordPress resources – looking for the stuff here. I want my WordPress to be accessed through “www.site.com/” or “www.site.com/wp” (preferred).
Before I started searching through the Codex, I had imagined crafting my own pages with PHP and including some “API” type of thing from the WordPress folder such that those WordPress resources are already defined. Letting WordPress handle the management and content of those pages is also fine – I’m still trying to decide which way to go. However, I can’t seem to understand how this process works. I get a lot of definitions for terms, but I still don’t see how I would do what I need to get this setup going. Can someone please link to a tutorial-type page in the Codex? or if this is simple enough, can someone tell me what the best thing to do is? Thanks.
P.S.: I should mention that I plan to stay current with the WordPress upgrade track, so that’s another constraint :).
When you say “static pages”, are you refering to WP Pages?
or pages that you’ve created outside of WP? I would recommend using the WP Pages feature.
1. For “static” pages you can use WP’s Write Page feature – it can handle all your non-post content.
1.1. If you’ll be using permalinks AND your blog will be at the root of your site (example.com) then these Pages can be accessed by example.com/about etc.
2. If there is something else in the root of your site, just upload Wp in a folder named “wp” – so it will reside at example.com/wp
3. Any PHP file/page outside WP can be made “WP aware” by putting at the top these lines:
Put this at the very top, before everything and you’ll be able to use all the WP template tags.
Thank you both. How does 1.1 work? How does WordPress decide what name these pages will be accessed under? I’ve been fooling around and it seems that the way that works is WordPress uses Apache’s feature to redirect this way. Is that true? If so, isn’t it also possible to put WP in its own folder AND have links from example.com/about?
Please, read always carefully the replies. And just because I didn’t post all the links from the Codex, it doesn’t mean you don’t have to read the relevant sections from there to understand what we suggested.
If you have WP installed, please, do experiment with it – study your admin panel and the possibilities in it:
So, when you’ll understand the basics, you will realize that if WP is in its own folder, like:
example.com/wp– the Pages created by WP should be like
You can have any kind of other pages/files even at the root level, like you said:
example.com/aboutbut those are not part of WP.
Thank you. I have accomplished what I set out to do and learned a bit while doing it.
My WordPress is in /wp/, but in the settings, I set the blog URI to /, and then copied the index.php and .htaccess to /. Then I updated the contents of the index.php to point to the new relative location. Then I went back into the permalinks to reconfigure the mod-rewrite for .htaccess.
So right now my / folder only has two files and one directory that is relevant and necessary for WordPress (which is what I had wanted all along). This was all on a page in the Codex (which I can’t find again).
- The topic ‘Template/Theme/Tags and Structure question’ is closed to new replies.