Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I need to get this set up ASAP and cannot seem to figure out how to do this after searching and searching.

I am using a WordPress install mostly as a CMS. I would like to have two separate areas on my site for blogs that do not share posts. When going to mydomain.com, it should show a custom page (nothing to do with a blog). I have this working fine, but I need to make it so /blog will show posts from my company and /photography/blog will show posts only related to photography.

My .htaccess doesn't have anything except the code WordPress said to put in it. Whenever I go to mydomain.com/blog, it forwards me to a post instead of showing me a list of posts/summaries like mydomain.com on a fresh WordPress install.

How can I fix this? My URLs are set up under Reading and Permalinks to look like the following.

How can I follow the format below so my posts on Photography will remain separate from my company's posts?

share|improve this question

2 Answers 2

If you want the two to be completely separate (as you hint at in your question), you have two (or three?) options:

  1. You install multiple blogs with a sub-directory structure of your choice. This way you will have complete control of your URLs. For example you could have one install running out of your /blog directory, and have another one running out of /blog/photography/blog. Make sure you read this article for more info.

  2. You run a MultiSite install. It will be a little trickier to setup, and you would probably need to write some URL rewrite rules to achieve what you want to achieve, but the pro of this approach is that you'll manage both sites from one admin panel. Check out this guide for guidance.

  3. This being said, if you don't want such separation you can always play with category names and URL rewrites to make it happen as well. I'm just not sure how separate you want the two to be.

share|improve this answer
    
I think something simple like what you described for #3 would be best. Actually, I just need to display any post that matches ID = 1 (for company under /blog) and anything else under (/photography/blog). How can I do this and set up an index page for each section that lists the post titles/dates/excerpt? –  Zoolander Mar 12 '13 at 20:15

What your are looking for are custom post types, you need to add a new custom post type named photography it will make a very similar output to what you are expecting, you will also have to change the posts page to the blog page on reading options. It's very easy to create a new post type just add this code to you functions.php file

add_action( 'init', 'create_post_type' );
function create_post_type() {
register_post_type( 'photography',
    array(
        'labels' => array(
            'name' => __( 'photographs' ),
            'singular_name' => __( 'photography' )
        ),
        'public' => true,
        'has_archive' => true,
        'rewrite' => array('slug' => 'photography'),
    )
);
}

There is a very good plugin that writes this for you and very good for understanding custom post types Custom Post Type UI

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.