Custom Post Type Archives

Community Forums Forums General Discussion Custom Post Type Archives

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  kfleeger 4 months, 1 week ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #110214

    kfleeger
    Member
    Post count: 2

    I have created a custom post type with archives for my podcasts.

    On the podcast archive I would like to show the whole podcast content (not an excerpt or content limit), BUT I would still like for my blog post archive, as well as my search archives, author pages, etc. to show only the content limit.

    When I change the archive settings under Genesis > Theme settings it effects all of the archive pages. Has anyone found a way to exclude a custom post type from following these settings?

    #110252

    badlydrawnben
    Member
    Post count: 16

    Hi kfleeger,

    Have you looked at Sridar’s tutorial site? There’s loads of good stuff on there and this one looks like it might solve your problem?

    http://sridharkatakam.com/single-archive-templates-custom-post-type-genesis/

    Thanks,

    Ben

    #110257

    kfleeger
    Member
    Post count: 2

    I did look at that site, yes, and thanks for the link. The archive template in his example though, still uses excerpts. So the instructions work, and I can make a custom archive template page, but I still can’t get the result that I want.

    I also found this http://www.shilling.id.au/2012/10/22/genesis-framework-how-to-show-experts-or-full-content-on-archive-pages/ which would be ideal (I’d rather do it in my functions.php file instead of having to make a new archive template) but it doesn’t seem to do anything.

    And I looked at this http://www.billerickson.net/code/full-content-features-in-grid-loop/ which should also work, but I can’t seem to get it to do anything either.

    If I manage to a get a combination to work though, I’ll be sure to post it.

    #110306

    kfleeger
    Member
    Post count: 2

    We found a fix! Add this to your functions.php file. Replace the word “podcast” with your custom post type.

    //make full podcast content
    function cd_show_full_content() {

    if( ‘podcast’ == get_post_type() )
    return ‘full’;
    }
    function cd_no_content_limit() {
    if( ‘podcast’ == get_post_type() )
    return ’0′;
    }

    add_filter( ‘genesis_pre_get_option_content_archive’, ‘cd_show_full_content’ );
    add_filter( ‘genesis_pre_get_option_content_archive_limit’, ‘cd_no_content_limit’ );

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

You must be logged in to reply to this topic.