• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Show Categories for blog post

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Show Categories for blog post

This topic is: not resolved

Tagged: category links, Post Categories

  • This topic has 4 replies, 2 voices, and was last updated 5 years, 11 months ago by dbuxton.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • August 23, 2016 at 12:21 pm #191920
    dbuxton
    Participant

    I 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 #191932
    Brad Dalton
    Participant

    The 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.


    Recent Client work

    August 24, 2016 at 8:08 am #191943
    dbuxton
    Participant

    Thanks 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.

    &lt;?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'] = '&lt;p class="comment-form-comment"&gt;&lt;label for="comment"&gt;' . _x( ' ', 'noun' ) . '&lt;/label&gt;&lt;textarea id="comment" name="comment" placeholder="Share your experience or questions..."cols="45" rows="1" aria-required="true"&gt;&lt;/textarea&gt;&lt;/p&gt;';
        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,
    Deb

    August 24, 2016 at 8:12 am #191944
    Brad Dalton
    Participant

    There'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.


    Recent Client work

    August 24, 2016 at 8:33 am #191945
    dbuxton
    Participant

    Thanks 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

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2022 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble