Community Forums › Forums › Archived Forums › Design Tips and Tricks › Show Categories for blog post
Tagged: category links, Post Categories
- This topic has 4 replies, 2 voices, and was last updated 8 years, 7 months ago by
dbuxton.
-
AuthorPosts
-
August 23, 2016 at 12:21 pm #191920
dbuxton
ParticipantI know I am totally missing something obvious, but I can't seem to get a posts' categories to show on the post. (Example: https://www.davidmartinco.com/what-song-is-running-your-business/). I would like the assigned categories to show at the bottom of the blog post, so people could find other similar posts.
I installed the Simple Edits plug-in hoping it would make it "simple" to add the categories, but that didn't happen. I am running just the Genesis Framework and a child theme, but it doesn't have anything complicated.
My functions.php, doesn't seem to have anything that I see would block the categories from showing on each blog post either.
This is my functions.php:
<?php
//* Start the engine
include_once( get_template_directory() . '/lib/init.php' );//* Child theme (do not remove)
define( 'CHILD_THEME_NAME', 'dmco' );//* Enqueue Google Fonts
add_action( 'wp_enqueue_scripts', 'genesis_sample_google_fonts' );
function genesis_sample_google_fonts() {wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Open Sans|Open Sans Condensed|Droid Serif:400,700|', array(), CHILD_THEME_VERSION );
}
//** add support for WP Courseware
add_post_type_support( 'course_unit', 'genesis-layouts' );//** add support Genesis sidebar supportfor WP Courseware
add_action('init', 'genesis_sidebar_support');
function genesis_sidebar_support() {
add_post_type_support( 'course_unit', 'genesis-simple-sidebars' );
}//** secondary nav menu before footer
remove_action( 'genesis_after_header', 'genesis_do_subnav' );
add_action( 'genesis_before_footer', 'genesis_do_subnav' );//* Add HTML5 markup structure
add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list' ) );//* Add viewport meta tag for mobile browsers
add_theme_support( 'genesis-responsive-viewport' );//* Add support for custom background
add_theme_support( 'custom-background' );//* Add support for 3-column footer widgets
add_theme_support( 'genesis-footer-widgets', 3 );//* Modify Comments
add_filter( 'comment_form_defaults', 'sp_comment_form_defaults' );
function sp_comment_form_defaults( $defaults ) {$defaults['title_reply'] = __( 'Leave a Comment' );
return $defaults;
}function wpsites_customize_comment_form_text_area($arg) {
$arg['comment_field'] = '<p class="comment-form-comment"><label for="comment">' . _x( ' ', 'noun' ) . '</label><textarea id="comment" name="comment" placeholder="Share your experience or questions..."cols="45" rows="1" aria-required="true"></textarea></p>';
return $arg;
}add_filter('comment_form_defaults', 'wpsites_customize_comment_form_text_area');
//* Remove comment form allowed tags
add_filter( 'comment_form_defaults', 'sp_remove_comment_form_allowed_tags' );
function sp_remove_comment_form_allowed_tags( $defaults ) {$defaults['comment_notes_after'] = '';
return $defaults;
}//* Modify the WordPress read more link
add_filter( 'the_content_more_link', 'sp_read_more_link' );
function sp_read_more_link() {
return '...[Continue Reading]';
}Any direction you can point me would be great.
https://www.davidmartinco.com/what-song-is-running-your-business/August 23, 2016 at 11:47 pm #191932Brad Dalton
ParticipantThe code you posted is broken and cannot be copied and pasted for testing as it hasn't been embedded correctly.
Disable Simple Edits and your category links should display.
August 24, 2016 at 8:08 am #191943dbuxton
ParticipantThanks Brad for the suggestion, but I had already tried without the Disable Simple Edits. It was kind of a last resort to install it.
I am resharing the code correctly. Sorry about that.
<?php //* Start the engine include_once( get_template_directory() . '/lib/init.php' ); //* Child theme (do not remove) define( 'CHILD_THEME_NAME', 'dmco' ); //* Enqueue Google Fonts add_action( 'wp_enqueue_scripts', 'genesis_sample_google_fonts' ); function genesis_sample_google_fonts() { wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Open Sans|Open Sans Condensed|Droid Serif:400,700|', array(), CHILD_THEME_VERSION ); } //** add support for WP Courseware add_post_type_support( 'course_unit', 'genesis-layouts' ); //** add support Genesis sidebar supportfor WP Courseware add_action('init', 'genesis_sidebar_support'); function genesis_sidebar_support() { add_post_type_support( 'course_unit', 'genesis-simple-sidebars' ); } //** secondary nav menu before footer remove_action( 'genesis_after_header', 'genesis_do_subnav' ); add_action( 'genesis_before_footer', 'genesis_do_subnav' ); //* Add HTML5 markup structure add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list' ) ); //* Add viewport meta tag for mobile browsers add_theme_support( 'genesis-responsive-viewport' ); //* Add support for custom background add_theme_support( 'custom-background' ); //* Add support for 3-column footer widgets add_theme_support( 'genesis-footer-widgets', 3 ); //* Modify Comments add_filter( 'comment_form_defaults', 'sp_comment_form_defaults' ); function sp_comment_form_defaults( $defaults ) { $defaults['title_reply'] = __( 'Leave a Comment' ); return $defaults; } function wpsites_customize_comment_form_text_area($arg) { $arg['comment_field'] = '<p class="comment-form-comment"><label for="comment">' . _x( ' ', 'noun' ) . '</label><textarea id="comment" name="comment" placeholder="Share your experience or questions..."cols="45" rows="1" aria-required="true"></textarea></p>'; return $arg; } add_filter('comment_form_defaults', 'wpsites_customize_comment_form_text_area'); //* Remove comment form allowed tags add_filter( 'comment_form_defaults', 'sp_remove_comment_form_allowed_tags' ); function sp_remove_comment_form_allowed_tags( $defaults ) { $defaults['comment_notes_after'] = ''; return $defaults; } //* Modify the WordPress read more link add_filter( 'the_content_more_link', 'sp_read_more_link' ); function sp_read_more_link() { return '<a href="' . get_permalink() . '">...[Continue Reading]</a>'; }
Thanks,
DebAugust 24, 2016 at 8:12 am #191944Brad Dalton
ParticipantThere's nothing in there that removes category links. I would disable all plugins and see if that works.
You will need to assign each post to a category.
August 24, 2016 at 8:33 am #191945dbuxton
ParticipantThanks Brad. I didn't think there was either, but always good to have another set of eyes to look at it.
Each post does have a category assigned. I will have to try the disabling of plugins...Oh...Joy... 🙂
Thanks again,
Deb -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.