Archived topic
Custom post type layout support?
1 reply · Started by Aaron on November 17, 2022
I am looking for customizer controls for custom post type archive/category archive layouts, and am guessing that they are not available? Is there a way to build a custom post type, just a simple heading, excerpt and image to the right?
Ideally the custom post types would just use the post layout settings.
On the archive link I shared, the titles are also missing and I don't think I'm disabling those anywhere. I am using an element for the archive, but only the featured image is disabled.
I achieved the current layout by adding this code:
img.attachment-full.size-full.wp-post-image {
width: 400px;
padding-left: 20px
}
.inside-article {
display: flex;
flex-direction: row-reverse;
align-items: center;
However I'd rather not resize such large images via CSS and use the right size.
and am guessing that they are not available?
That's correct. CPT are not supported by default as the theme doesn't know they exist.
Is there a way to build a custom post type, just a simple heading, excerpt and image to the right?
You can use a block element - content template and set the CTP archive as the location:
https://docs.generatepress.com/article/block-element-content-template/
Or
Use a block element - loop template with the query loop block of GenerateBlocks plugin:
https://docs.generatepress.com/article/block-element-loop-template/
https://docs.generateblocks.com/article/query-loop-overview/
Both solution would require GenerateBlocks plugin.