Grow your CSS skills. Land your dream job.

WordPress – /blog – parent/child – I’ll try to explain :)

  • # March 6, 2013 at 7:14 pm

    I have a WordPress site that is made up of several WP Pages with custom templates assigned and a blog. The blog is also a WP Page with a custom template. The blog articles are found at **domain.com/blog**. This is what I want. However when you go to the individual blog article it’s **domain.com/individual-blog-article-title** rather than **domain.com/blog/individual-blog-article-title**.

    Is there a setting that allows me to keep the /blog in front of the singe blog posts?

    Not sure if this matters but the actual directory structure is:

    root
    > wordpress
    > wp-content
    >> themes
    >> plugins

    The site is on a dev server here:
    http://mhopple.com.s163682.gridserver.com/
    http://mhopple.com.s163682.gridserver.com/blog/

    http://mhopple.com.s163682.gridserver.com/trend-watch-going-coastal/

    # March 6, 2013 at 7:39 pm

    Settings > Permalinks.

    # March 7, 2013 at 11:00 am

    Thanks for the response! I’ve tried messing with the permalinks structure. But I’m not sure that’s exactly what I’m looking for. I think that effects the site as a whole—rather than just the blog pages, right?

    So what I tried was this:

    Custom Structure: /%category%/%postname%/

    Custom category base: blog

    But then I’d have to make sure that every post has a category of “blog” right? Plus that makes all the other pages (non-blog pages) have “blog” in the url.

    Is that inline with what you were thinking or what would you recommend TheDoc? Is there a way to only effect the permalink structure of certain pages? Or perhaps I have a larger issue?

    # March 7, 2013 at 12:42 pm

    > But then I’d have to make sure that every post has a category of “blog” right? Plus that makes all the other pages (non-blog pages) have “blog” in the url.

    Nope! It will just make sure to insert /blog *before* the category.

    # March 7, 2013 at 1:20 pm

    I think that you have to enter the following line in the “custom structure” setting:

    /blog/%category%/%postname%/

    However, with that setting, pretty much your entire site will be behind that “/blog” part (all posts, pages, and listings).

    If you want to effect the permalink structure of certain pages, you can set that for every single individual blog post or page. If you’re creating/editing a post, under the Title field, hit EDIT and then you can set the permalink for that post only.

    @TheDoc, correct me if I’m wrong!

    # March 7, 2013 at 1:31 pm

    @Senff – that’s right, but instead of doing that you can set the category base like the OP mentions above. That will only affect blog posts.

    # March 7, 2013 at 1:51 pm

    Right! Should try that out myself.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".