• I would like to know what is the best way to go with my site and the correct way

    I am looking at adding some areas onto my site so people can find out what is happening in their area. I am looking at adding eight pages but i am not sure which is the best way to do it.

    At the moment i have the below set up but not sure if that is right or if i should have gone with categories like i have done with london

    can people give me pros and cons on using page and category please so i can work out which is the best option

    • This topic was modified 3 years, 2 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    Are you saying the best way may not be the correct way? ??

    No matter, I’m just amused by the implication. WP pages don’t use categories by default, though that can be changed. But if you write happenings into posts, then organizing by category will work perfectly well. If you really want pages to have categories, a bit of custom code will accomplish that. If you need to use categories for other reasons, you could create a custom “city” taxonomy, which could be applied to either or both pages and posts.

    You could even create a custom post type just for happenings, and apply “city” taxonomy terms to them. You can organize site content by any number of post types and taxonomy terms, either using the ones provided by default, or adding your own. Using those object types as organizational methods, do whatever makes the most sense for your situation. Additionally, post types and taxonomy terms can be hierarchical, so you can use hierarchy as an organizational device as well. (posts and tags are not hierarchical, but others either are or can be)

    Thread Starter vintageman

    (@vintageman)

    what i am asking is. My home page is a page. So, what i am asking is, if i want to have a section of my site about London, and then another section of my site about Manchester, and then another section of my site about Leeds, do i set those sections up as pages, or have a menu link to category.

    So, i have a category for london and all my articles for london goes into those categories, so i am saying is that good enough for the structure of my site, or should i have each section as a home page and then post the articles on the home page from the category

    Thread Starter vintageman

    (@vintageman)

    so, i have a choice on my menu

    home page – london (page or category)

    Moderator bcworkz

    (@bcworkz)

    It’ll work either way. There’s no wrong answer. A category archive is easiest if you just want a list of posts in the category. Getting that on a page will require a custom page template. OTOH, if you want some static page content to appear with the posts, perhaps a brief history of the city, then you have two different post types, so you’ll need a custom template either way. It could be a little tricky getting the other post type that’s not native to the request.

    For example, a page displays a history easily enough, but for it to also list related posts, the template has to know what category the page is for. This can be accomplished by extending categories to pages, or by a custom field for the purpose.

    Or for a category archive, listing posts is easy, but the template needs to know where to get the current city’s page content. It needs a relationship as noted above to be able to do so. Alternately, instead of a page, place the history in another post in the category, and make it sticky. The archive could display sticky posts in a different manner so it doesn’t look like just another post and more like static page content.

    The same end result can be achieved either way. The principal difference is in the URLs used to get there. A page URL might look like example.info/london/, a category URL would be example.info/category/london/.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Pages v category’ is closed to new replies.