[Support request] Formatting CPT Posts in Archives/Search

Home Forums Support [Support request] Formatting CPT Posts in Archives/Search

Home Forums Support Formatting CPT Posts in Archives/Search

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #521079
    Suggie

    Hi guys. I did a search on this topic and found a bit of information, but being new, I just can’t quite grasp what is being said. Hoping you can put into layman’s terms for me!

    I used CPTUI plugin to create a custom post type. I then utilized the info on the link below to get WordPress to merge regular and CPT for categories and tags. Now, when I click on a category, it does list the CPT along with my other posts….however…the formatting is different for the CPT. How can I get it to match what I have for the regular posts?

    The website URL I included in this submission is an example. The CPT has the title “I Can’t Make This Up…” As you can see, the formatting is different.

    Hoping it’s an easy fix.

    GP Premium 1.5.6
    #521292
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Can you try adding this function?:

    add_filter( 'generate_blog_columns', 'tu_book_review_columns' );
    function tu_book_review_columns( $columns ) {
        if ( 'book_review' == get_post_type() ) {
            return true;
        }
    
        return $columns;
    }

    Let me know πŸ™‚

    #521898
    Suggie

    Thank you, Tom. That sort of did the trick. The CPT post is now showing up in the column format, but it doesn’t include any metadata (date, category, tags).

    One other follow-up (and please let me know if it should be a separate ticket): The CPT post doesn’t show up in the Search archive. Can I add to that as well?

    Thanks again for your awesomeness!

    #522124
    Tom
    Lead Developer
    Lead Developer
    #524757
    Suggie

    Thanks, Tom. I’ll give those posts a try. One more question. and one that seems dumb to me, but I can’t quite figure it out. πŸ™‚

    Currently for my blog page, I’m using Elementor to just list all posts by date. How can I do that with GeneratePress if I don’t want to use Elementor for that purpose? Can I use the above information about CPT search for this issue as well or is that only limited to search?

    Example: https://thegassysquirrel.com/blog

    Thanks a bunch!

    #525040
    Tom
    Lead Developer
    Lead Developer

    You can use the standard WP/GP blog by setting the “Posts page” to an empty page in “Settings > Reading”.

    Then you can configure your blog options in Customize > Layout > Blog, which includes columns etc..

    Let me know if you need more info πŸ™‚

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.