I am trying to get a list of my Wordpress categories to display on a Page, but haven't cracked this yet.
So far, I have been able to create a custom category page (category-categoryname.php), to display a list of Page Titles associated with a single category. The code I have used for this includes the following Loop:
while ( have_posts() ) : the_post(); ?> <h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4>
However, I am now trying to display a list of Category titles on a normal WP Page, using the plugin "Post Snippets" to insert the PHP.
Q1: How do I change The Loop to display all Category titles, instead of Pages associated with a single category?
Q2: Is there anything else I need to add, like some code to functions.php etc?
Q3: Would it be easier to create a custom page template, instead of pasting into a regular page?
Note, I am not trying to filter out any categories from the list, like sub-categories or categories without associated pages/posts etc. Although filtering out 'Uncategorised' would be nice.
Thank you for reading