Archived topic
I used GPP to modify Blog archive & Blog singles. How do I apply to CPTS
3 replies · Started by Josh on December 6, 2019
How can I customize the display of my custom post type archive and single pages to match blog pages? Or how can i modify them at all? Thanks!
Hi there,
how did you create the CPTs?
Just as normal with my own function using register_post_type();.
//Create Past Work Post Type
register_post_type('project', array(
'public' => true,
'labels' => array(
'name' => 'Projects',
'add_new_item' => 'Add New Project',
'edit_item' => 'Edit Project',
'all items' => 'All Projects',
'singular_name' => 'Project'
),
'menu_icon' => 'dashicons-editor-help',
'menu_position' => 7,
'has_archive' => true,
'publicly_queryable' => true,
'supports' => array('title', 'editor','thumbnail'),
'rewrite'=> array(
'slug' => 'projects',
),
));
What do your blog pages look like?
If you're using columns, you can apply them to your CPTs like this: https://docs.generatepress.com/article/using-columns-in-the-blog/#adding-columns-to-your-custom-post-type
Let me know :)