WordPress.org

Ready to get started?Download WordPress

Forums

Streamlining 26 (soon to be 30) template files (5 posts)

  1. Jinsan
    Member
    Posted 9 years ago #

    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.

    Cheers

  2. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    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?

  3. Jinsan
    Member
    Posted 9 years ago #

    Perhaps the latter?

    Here's the site as it stands:

    http://reviews.sekhu.net

    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?

  4. Root
    Member
    Posted 9 years ago #

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

  5. Jinsan
    Member
    Posted 9 years ago #

    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

    Cheers

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.