• 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 :).

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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:
    <?php
    require('./path-to-your-blog/wp-blog-header.php');
    ?>

    Put this at the very top, before everything and you’ll be able to use all the WP template tags.

    Thread Starter kwarrior

    (@kwarrior)

    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.
    http://codex.wordpress.org/Getting_Started_with_WordPress
    http://codex.wordpress.org/Working_with_WordPress
    http://codex.wordpress.org/Using_Permalinks
    http://codex.wordpress.org/Pages
    If you have WP installed, please, do experiment with it – study your admin panel and the possibilities in it:
    http://codex.wordpress.org/Administration_Panels

    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 example.com/wp/page-title
    You can have any kind of other pages/files even at the root level, like you said: example.com/about but those are not part of WP.

    Thread Starter kwarrior

    (@kwarrior)

    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).

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Template/Theme/Tags and Structure question’ is closed to new replies.