Support » Fixing WordPress » Help with categories and how best to display different images on templates

  • Resolved markymark2007

    (@markymark2007)


    I’m trying to create a new site and I’d like to know if it’s possible to create a variable which will contain the category_id of any selected post within the Loop so that I could then use the variable in conjunction with a case statement to display the correct html information relating to that post from around 20 different categories.

    I’d like to keep it simple and stick to using the templates that come with WP. I dont want to create 20 different templates if at all possible.

    I’m not a programmer so please be as clear as you can be with any help..

    Cheers
    mark

Viewing 4 replies - 1 through 4 (of 4 total)
  • If you are not a programmer – then use a plugin that makes that possible… and there is no such thing that “the templates that come with WP”.
    Classic comes with 7 files and Default with 16.
    You make and use as many templates as you need for your customization.

    But I dont want to create 20 templates, that’s the point…

    So is it possible do to grab the category_id and then store it within a variable within the loop?

    I’m using themed templates and not the classic or default. Sorry about the confusion.

    Thanks
    mark

    To further expand upon my reasoning for not wanting to create multiple pages and irrespective of the number of page requirements.

    I will need to put my proposed solution in place on all pages (x 20), so you can probably guess why I dont want to take the route of creating individual pages for each category/page instance and therefore some conditional code would be the ideal solution, at least that is my ideal world solution.

    I hope that’s of some help…

    I have sorted this out myself.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Help with categories and how best to display different images on templates’ is closed to new replies.