Archived topic
CPT with the same options as the post
8 replies · Started by caleidoscopic on September 13, 2018
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
Hi there,
Does this help?
https://generatepress.com/forums/topic/layout-for-custom-posts-archive/#post-313489
If you are referring to things like sidebar, check out the Layout Element module:
https://docs.generatepress.com/article/layout-element-overview/
CPT should be in the Display Rule.
Let me know if this helps :)
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
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 :)