WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Sections (17 posts)

  1. driz
    Member
    Posted 4 years ago #

    How could I create WordPress sections? So I get this sort of setup:

    http://domain.com/blog/category/design/

    Blog being a section, then design a category within that section.

  2. driz
    Member
    Posted 4 years ago #

    Any updates on this? I noticed that http://carsonified.com/ use this on their site (check the blog for the example).

  3. lokrin2000
    Member
    Posted 4 years ago #

    Those are standard WordPress categories. Instead of having them listed in the sidebar they have them listed in a horizontal NavBar up top.

    There are a few themes around like that already, or you can tweak a theme that you like.

  4. driz
    Member
    Posted 4 years ago #

    Yes I know they're categories, but how have they got the category AFTER the main category, so for example domain.com/blog/category/...

    By default WordPress would do this: domain.com/category/blog/.../

    Any ideas? I have looked into simply adding /blog/ in the permalink, but that would break if I wanted more than one section, such as blog, and portfolio.

  5. driz
    Member
    Posted 4 years ago #

    Would what is discussed here: http://codex.wordpress.org/Function_Reference/WP_Rewrite

    Be of any help? If so, could someone post how to write it so I can have this sort of setup:

    domain.com/blog/category/...

    domain.com/portfolio/category/...

  6. driz
    Member
    Posted 4 years ago #

    Any updates?

  7. driz
    Member
    Posted 4 years ago #

    Hate to be a pain. But would anyone be able to help with this? Thanks again.

  8. darttiglao
    Member
    Posted 4 years ago #

    A bit clunky solution but I remember having a web client with two branches of their shop and each must have its own subsite in one domain, with slightly differences in theme and content.

    So I set up two almost identical wordpress sites in one domain. So two folders or sections. So the format was http://www.client.com/branch1 and http://www.client.com/branch2.

    Which resulted in something of what you imagine as sections. Of course the root folder or your themes should have external links to both wordpress sites.

    It's actually easier than it sounds.

  9. darttiglao
    Member
    Posted 4 years ago #

    I have a feeling this is also what carsonified.com did in a way - The site has manually coded html folders and a subsite of an installed wordpress blog...

  10. driz
    Member
    Posted 4 years ago #

    I don't want to have two installations of WordPress and I'm pretty sure that Carsonified uses WP for their whole site, but stick /blog/ in the permalink settings to fake the section. But looking at the WP_Rewrite it seems it would be possible to create your own permalinks to achieve this.

    I came across this: http://www.prodeveloper.org/create-your-own-rewrite-rules-in-wordpress.html which explains how to do it in a nutshell. But I don't fully understand it. Some help to create what I want using WP_Rewrite would be super helpful :)

  11. darttiglao
    Member
    Posted 4 years ago #

    How do you plan to create and manage the "sections"? As pages or categories?

  12. driz
    Member
    Posted 4 years ago #

    Does it matter? I actually use both. Pages and Cats to manage my content. So I have a page called Blog and also a Category called Blog to house all my blog posts and the same for my Portfolio.

  13. driz
    Member
    Posted 4 years ago #

    Any updates? Thanks again.

  14. darttiglao
    Member
    Posted 4 years ago #

    Hi. Sorry I have to stick to my original solution of creating different WordPress installations. That or create template pages for sections with a specific loop for a category of post . Something like the solution here http://www.wprecipes.com/wordpress-shortcode-display-the-loop. In effect, a page will have its own category.

    So yes indeed you have to be clear whether you will manage the main sections as categories or as pages because the structure you want seems like having post categories within a page category when wordpress by default treats them separately.

    As as I know the Rewrite rules solution won't help you at all since it will just rewrite the URL for one "section" that you want.

  15. driz
    Member
    Posted 4 years ago #

    Thanks for the reply. I already have the system setup using categories as sections using WP_Query for each one and styling them different (similar in effect but different in code to what you linked to)

    What I want is to edit the URLS for my sections. So one "section" would be perfect and then I can just copy the code for each section right? After all it's a custom Theme so I don't need to worry about a person adding NEW Sections as I'm the one creating them, same as having the custom category templates.

  16. greg_a
    Member
    Posted 4 years ago #

    driz, in answer to your query regarding the Carsonified site, we do indeed simply use '/blog/' in the permalink (using a page called 'Blog' and setting 'Posts page' under 'Settings > Reading' to 'Blog').

    If you're not using / displaying / relying on the author field you could potentially use that to create a second 'category' for use in the URL structure / post separation, bit of a bodge but might do the trick.

  17. driz
    Member
    Posted 4 years ago #

    @greg_a Thanks. But what I have two sections? Like Blog and Portfolio

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.