• 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

Custom Post Type Archives

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 › General Discussion › Custom Post Type Archives

This topic is: not resolved

Tagged: archives, content limit, Custom Post Type

  • This topic has 3 replies, 2 voices, and was last updated 8 years, 7 months ago by kfleeger.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • June 17, 2014 at 12:03 pm #110214
    kfleeger
    Member

    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?

    June 17, 2014 at 2:32 pm #110252
    badlydrawnben
    Member

    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

    June 17, 2014 at 2:41 pm #110257
    kfleeger
    Member

    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.

    June 17, 2014 at 7:42 pm #110306
    kfleeger
    Member

    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' );

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘General Discussion’ 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

© 2023 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