Support » Themes and Templates » Streamlining 26 (soon to be 30) template files

  • I’m had no idea that getting a customised, invidiual category would be a costly as almost 30 template files. I’ve had to multiply the existing template file by 4 or 5 in order to carry out the individual style for each category.

    Surely there’s an easier way to do this – WP has given me the freedom, but not the management (as far as I know, please tell me otherwise) of having so many template files.

    Is there a way I can get all these files down to a handful?

    Right now I have multiples of:

    index.php > category-x.php
    sidebar.php > sidebarx.php
    header.php > headerx.php
    styles.css>categoryx.css (I know not a t emplate file, but still!)

    And soon I will be adding single.php, and I hope to God I don’t have to do the same to get the archives looking individual by creating multiple php files. Perhaps I’ve made this a lot of work for myself, and gone the hard way about it it, but I don’t know an easier way and one hasn’t been highlighted.

    Hope someone can help.


Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Ryan Boren


    WordPress Dev

    Are your category templates structured differently enough to even warrant separate templates? Can you achieve your goal by applying different CSS to the same templates? What are you trying to accomplish? Are you trying to make every single page look different? Structurally different or just superficially different?

    Perhaps the latter?

    Here’s the site as it stands:

    Thing is I am not a coder or a designer so I don’t know how to be efficient with these things but even for me 26 templates is HUGE. What do you reckon I can do ryan? I wouldn’t know how to apply different css to the same templates that’s a whole other topic in itself is it?

    Well just use CSS cat selectors. You might need to put the ids in by hand.

    That would be quite an excellent idea if I knew what you meant by using CSS cat selectors, do you have an example of such? I need to learn this so, if I can see how it works I might be able to understand it better


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Streamlining 26 (soon to be 30) template files’ is closed to new replies.