WordPress.org

Support

Support » How-To and Troubleshooting » Category or Page?

Category or Page?

  • I’m not sure what to use here. I have 10 categories and I have a bit of intro text and an image on each category page. That would lead me to believe that I should use a page to show each category’s posts and then create a new page template for each.

    A few things though:

    1. That would mean creating 10 identical templates but only changing the category ID in the query.

    2. If I wanted to call the pages the same as the categories then I would have to rename the categories as the category will supersede the page slug.

    Not sure how to play it.

    Any ideas or thoughts would be greatly appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • One solution would be to create a page template that retrieves a custom field containing the id of the category. Then create a Page for each category and put the id of the category in the custom field.

    I used that approach for this site. Everything you see under ‘ADS AND MORE’ and ‘GOOD STUFF’ is handled by a single template which gets the category from a custom field named ‘category-to-show’.

    Oooh, I like that idea. Very neat.

    I suppose with regards to the slugs I’ll just have to name the categories something like blog-category, news-category etc so I can then call the pages blog, news etc.

    I don’t know if it matters, but if you are using the WP Appearance Menus, you can title the Page anything you want but have the menu label as something else.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Category or Page?’ is closed to new replies.
Skip to toolbar