Community Forums › Forums › Archived Forums › Design Tips and Tricks › Need a custom category page
Tagged: custom category page
- This topic has 3 replies, 2 voices, and was last updated 8 years, 5 months ago by Toby39.
-
AuthorPosts
-
October 24, 2015 at 10:55 am #168900Toby39Participant
Hi folks,
I am using Genesis Sample (child theme) which I have edited using CSS and the plugins "Genesis Simple Hooks" and "Add Categories to Pages". I have also installed "Custom Post Types" but am not using it at present.When viewing a Category URL I notice that it displays a list of Pages that are assigned under the category.
However, I wish to be able to customise the Category page, adding the content as if it were a regular Page / Post.Q: Is this change achievable, or will I have to resort to putting my Pages under Parent Pages instead of Categories?
I would prefer to be able to customise the Category pages, because some of my Pages might have to be listed under multiple different Categories. I assume that a Page can't be listed under multiple Parent Pages.
Any help you could offer me would be greatly appreciated. I have found similar threads on this forum, but they are quite specific and don't seem to provide the particular answer I'm looking for. I have also found some info elsewhere, but it warns that their solution will not work if using a framework (like Genesis I assume).
Thank you for reading 🙂
October 26, 2015 at 7:46 am #169032Victor FontModeratorYou can create a category page from the menu by adding a category ling, or you can create a specific custom category page. This codex article explains how: https://codex.wordpress.org/Category_Templates
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?October 26, 2015 at 3:04 pm #169113Toby39ParticipantHi Victor, thanks for your help.
I have managed to create a custom category page. I didn't realise that it would work simply by created the page, naming the file properly, and putting it in the right folder.
category-categoryname.phpI pasted in sample code from here: http://www.wpbeginner.com/wp-themes/how-to-create-category-templates-in-wordpress/ ... under this title: Creating a Category Template in WordPress
I am now trying to edit The Loop.
I have identified it, and am working my way through it, learning the various commands.Also, I have found that the code I pasted into this new file has caused the styling to break, as (at wider browser widths) the main content box now spans the entire width of the site, and the widget column has been pushed down beneath it.
This doesn't happen with a standard un-edited category, that doesn't use a customised file.
I will try and find a fix.October 27, 2015 at 4:16 pm #169271Toby39ParticipantProgress - I have now been able to edit the page listing the Categories, so they show titles only and not the whole content of each page.
However, I was wondering if you might know how to use code to display a List of all the Categories on a single page (instead of a list of Pages within a Category, which I have now been able to do, see above).
I have already found some web pages that seem relevant, and I have tried some code but it doesn't seem to display what I'm trying to achieve, despite using the plugins "Post Snippets" and "Insert PHP". As PHP is not my best area of knowledge I would appreciate any guidance - perhaps in the form of a suitable link.
Thanks for reading
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.