Site logo

Archived topic

CPT with the same options as the post

8 replies · Started by caleidoscopic on September 13, 2018

Viewing posts 1–9 of 9

How can I make the single and archives page of a CPT have the same visualization as the blog?

I created the CPT with Custom Post Type UI

We are doing well!

Now I have the portfolios archives page in 3 columns
Do I have to use the two filters that appear on that page or can you unify them into one?
https://generatepress.com/forums/topic/layout-for-custom-posts-archive/#post-313489

However, with Layout Element the title "Archives: Portfolios" does not disappear.

On each single portfolio page, how do I add the date or remove comments?

I don't know if I've explained well before.

I used the header element to put the title of my portfolio archive

But the title "Archives: Portfolios" still appears

Can I remove it? With layout element it's not possible

https://jmp.sh/M0vu8zO

In your Header Element are you using this template tag?: {{post_title}}

If so, it will remove the default title from below.

If you're not able to do that, you can do something like this:

add_action( 'wp', function() {
    if ( is_post_type_archive( 'my-cpt' ) ) {
        remove_action( 'generate_archive_title', 'generate_archive_title' );
    }
} );

Thanks Tom!

I didn't have {{post_title}} because I want to put a different title

I used the code you pass me and it works perfect!

Let me ask you a couple of short questions about this

How do I reduce the size of the "Excerpt"?

Can I change the text of the "Read more" button?

I want it to be different from the blog

Can you open a new topic for the separate questions as now you want settings different than the posts page?

It should help others as well.

Thanks!

Sorry, I wanted to show it in columns like the blog but with small changes

Thanks for opening new topics :)

This archived topic is closed to new replies.