Viewing 5 replies - 1 through 5 (of 5 total)
  • https://codex.www.ads-software.com/Template_Hierarchy

    as you can see from that article of the codex, archive.php does the job of showing category archives perfectly well.

    if you want to have a category.php, possibly to have a different design for the category archive, then simply copy the code of archive.php and save it as category.php, and make any edits in there.

    as you can’t make new files in the admin/apearance/editor, you may have to create a new file in your cpanel or in the file manager of your host; or locally on your computer and upload it with ftp.

    Hi,

    Paste this in your archives.php file :

    <h4>Archives by category :</h4>
    <div style="margin-left: 30px;">
    <ul>
    <?php wp_list_categories('show_count=1&title_li='); ?>
    </ul>
    </div>

    That’s it !
    This will show category on your archives page.

    Thread Starter Copywrite

    (@copywrite2012)

    Thanks for the advice, I don’t have a category.php page and it is running from the archive.php OK
    I have seven category pages each with different text so it seems a bit laborious to do 7 else statements- not to mention the size of the file. What would be a solution? Using a db for the information and outputting it according to the category?

    I have seven category pages each with different text

    category templates ?

    https://codex.www.ads-software.com/Category_Templates

    Thread Starter Copywrite

    (@copywrite2012)

    Thanks I’m checking out the link

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Why doesn't my theme have a category page?’ is closed to new replies.