Customise Category.php
-
Hi,
Sorry if this has been asked 1,001 times before.
I am using the Bootville Lite Theme, and have created a Child Theme of it. The theme did not contain a “category.php” file, so I copied “archive.php” and renamed it as “category.php”.
I would like to revise the layout of the standard category.php layout, so that instead of displaying each full post on each category page (e.g. http://oracle101.co.uk/category/accounts-payable/), all I see is the Category title and a list of posts for that category sorted in alphabetical order, probably like:
I’ve looked around on the web, e.g.
http://yourwebsiteengineer.com/create-a-custom-category-page/
https://codex.wordpress.org/The_Loop
https://wordpress.org/support/topic/modifying-the-loop-for-category-templates?replies=22
http://stackoverflow.com/questions/20916722/how-to-modify-the-wordpress-main-loopBut I’m still stuck – I think I need to edit this bit of “category.php”:
<?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php /* Include the Post-Format-specific template for the content. * If you want to override this in a child theme, then include a file * called content-___.php (where ___ is the Post Format name) and that will be used instead. */ get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?>So does that mean I need to edit some core bit of WP code?
Or write a custom piece of code?
From reading, some advice says I need to create a custom category page for every category on the site – is that right – each time I create a new category, would I in theory need to duplicate some custom category page to reference the category slug for the new category?
Any advice much appreciated
Thanks
The topic ‘Customise Category.php’ is closed to new replies.