Community Forums › Forums › Archived Forums › Design Tips and Tricks › Adding tags, categories in Genesis child theme pages
Tagged: categories, pages, tags
- This topic has 6 replies, 3 voices, and was last updated 10 years, 4 months ago by Marcy.
-
AuthorPosts
-
September 24, 2014 at 8:07 am #125537Jason WeberMember
Does anybody know an efficient way to add categories or tags to a Genesis child theme's pages?
I've searched, but just can't seem to find the right solution.
Thanks!
https://nationalcdp.orgSeptember 24, 2014 at 4:56 pm #125596MarcyParticipantSeptember 25, 2014 at 10:14 pm #125764Jason WeberMemberThanks Marcy, but that is for standard WordPress themes; it doesn't work for Genesis child themes; there is no single.php, post.php, etc. .... in my case, I'm using Parallax Pro, which isn't too different from any other Genesis child themes.
September 26, 2014 at 1:21 am #125782MarcyParticipantSeptember 26, 2014 at 5:46 am #125808DTHkellyMemberYou can create your own custom page template to display categories/tags on your pages.
Here's an example for adding single.php to your Genesis childtheme:
Custom page templates:
http://www.carriedils.com/custom-page-template-genesis/http://wpgenesis.blogspot.com/2013/04/custom-page-template-in-genesis-child.html
September 26, 2014 at 11:11 am #125832MarcyParticipantYou may want to post a new thread asking how to filter genesis_post_meta to include pages; this function excludes pages.
I get in a loop. But Genesis IS WordPress, so I post that below.The plugin works fine adding categories and tags to pages. It also adds them to the queries. That's all it does; it's your job to add them to your templates.
The pages should display along with the posts using a normal Genesis category page.
http://my.studiopress.com/tutorials/category-blog-page/
Or you can use a custom template as Kellylise suggests.If you just want the tags and categories on the bottom of your pages, you can add this to your functions.php:
//* Customize the entry meta in the entry footer (requires HTML5 theme support) add_action('genesis_entry_footer', 'custom_page_post_meta'); function custom_page_post_meta() { if ( 'page' === get_post_type() ) { $cats = get_the_category_list( $before = '', $sep = ', ', $after = '', $post_id ); $tags = get_the_tag_list( $before = '', $sep = ', ', $after = '', $post_id ); if ( $cats || $tags ) { echo '<footer class="entry-footer"><p class="entry-meta"'; if ($cats) { echo '<span class="entry-categories">Filed Under: ' . get_the_category_list( ', ', $post_id ) . '</span>'; } if ($tags) { echo '<span class="entry-tags">Tagged With: ' . $tags . '</span>'; } echo '</p></footer>'; } } }
Or you can use the wpsites single.php template, as Kellylise suggests. Just add the part between the if ('page'...) brackets.
Marcy | Amethyst Website Design | Twitter
September 26, 2014 at 11:38 am #125838MarcyParticipantI left a > out of this line:
echo '<footer class="entry-footer"><p class="entry-meta">';
Marcy | Amethyst Website Design | Twitter
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.