Custom Post Type add filed under: category names

Community Forums Forums Design Tips and Tricks Custom Post Type add filed under: category names

This topic is: not resolved

This topic contains 7 replies, has 4 voices, and was last updated by  deejuk 2 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #115486

    deejuk
    Member
    Post count: 12

    Hi all

    I have created a custom post type and have the data displaying fine. However I want to include the custom taxonomy details in the bit that says Filed Under:

    This bit is the bit that normally shows the Filed Under: Category 1, Category 2 etc.

    Does anyone know how to do this – any help would be great

    #115492

    genwrock
    Member
    Post count: 586

    use this shortcode

    [post_terms taxonomy="YOUR TAXONOMY HERE"]


    My Genesis Child Themes Work | Please Follow Me on Twitter If I’ve helped.

    #115507

    deejuk
    Member
    Post count: 12

    Hi thanks for that … where do I past the shortcode in functions.php or my a template file?

    #115512

    Kellylise
    Participant
    Post count: 393
    #115533

    braddalton
    Participant
    Post count: 9802
    #115668

    deejuk
    Member
    Post count: 12

    Thank you for the info. So added the following and it worked great for custom post types. It shows the CPT taxonomy under filed under, however the Category Taxonomy for regular posts is missing.

    //* Customize the entry meta in the entry footer (requires HTML5 theme support)
    add_filter( 'genesis_post_meta', 'sp_post_meta_filter' );
    function sp_post_meta_filter($post_meta) {
    	$post_meta = '[post_terms taxonomy="mytaxonomy"], [post_tags]';
    	return $post_meta;
    }
    #115722

    braddalton
    Participant
    Post count: 9802

    Because you removed it. Add it back.


    #115735

    deejuk
    Member
    Post count: 12

    That kind of works better thank you Brad. I have the following code.

    //* Customize the entry meta in the entry footer (requires HTML5 theme support)
    add_filter( 'genesis_post_meta', 'sp_post_meta_filter' );
    function sp_post_meta_filter($post_meta) {
    	$post_meta = '[post_terms taxonomy="mytaxonomy"] [post_categories] [post_tags]';
    	return $post_meta;
    }

    This works fine for normal posts, but for custom post types I get left with an additional Filed Under: where the normal category should be. As it’s not linked to normal categories it hasn’t got one so obviously can’t show it.

    This is what I see when I view the custom post type archive

    Filed Under: My custom taxonomy
    Filed Under:
    Tags: my post tags

    This is what I see when I view the normal post archive
    Filed Under: A regular category
    Tags: My post tags.

    Any help on this would be great .. even though it takes me a while to work out the pointers but thank you very much

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.