Site logo

Archived topic

theme builder help

7 replies · Started by siddardha thammana on November 10, 2021

Viewing posts 1–8 of 8

Hello

I am trying the theme builder to create post and archive layout

I created a card block using Stackables and dynamic data and applied it to 'all archives', but it is not coming up as in the demo video here https://www.youtube.com/watch?v=pM_GVt3TYrs

I added the page link in the sensitive info area to the CPT archive page, please check and let me know what changes I need to make

Thanks

Hi there,

I created a card block using Stackables and dynamic data and applied it to ‘all archives’,

If you are building a block element - content template, please do use GenerateBlocks as the block plugin, the style built with other plugins might be stripped.
https://wordpress.org/plugins/generateblocks/

Hello

I removed the stackables card and used a default template from the content templates

I didn't make any changes expect for setting the primary container size at 350px

How do I make it appear in columns?

2. Also I might still have to use Stackables as Generateblocks doesnt support custom fields yet, any plans for it? Please consider this feature

Thanks

Hi there,

1. The Columns you set in Customizer > Layout > Blog
1.1. YOU DO NOT set the max-width of the containers in the block element, as the Blog columns will fix the widths.

2. In the Dynamic Data options you can choose Post Meta ( which is Custom Fields ).

Hello

This time I tried on a fresh install with only generatepress and generateblocks

I want to create an archive layout for my CPT...and its not coming up as shown in the demo video

https://a.cl.ly/2NuzJnp7

Please check this video and tell me what I am doing wrong

Thanks
Sid

Hi Siddardha,

By default, columns only apply to Posts, and not custom post types. To address this, you’ll need to add a custom PHP snippet.

Kindly refer to this: https://generatepress.com/forums/topic/theme-builder-help/#post-2144538

Specifically:

add_filter( 'generate_blog_columns', function( $columns ) {
    if ( 'CPT_SLUG' === get_post_type() && ! is_singular() ) {
        return true;
    }

    return $columns;
} );

Kindly replace CPT_SLUG with your CPT’s slug.

Here is an article you may refer to with regards to adding custom PHP: https://docs.generatepress.com/article/adding-php/

Hope this helps! Kindly let us know how it goes! :)

Thank you

This code worked

How do I make the cards in a row same height? I tried enabling and disabling the 'Masonary' option in the customizer, but it didn't show any changes

Awesome! With your current structure, here is a CSS code you may try to make the rows similar in height:

.site-main .generate-columns-container > article.dynamic-content-template {
    display:flex;
    flex-direction:column;
}

.site-main .generate-columns-container > article.dynamic-content-template > .gb-button-wrapper {
    margin-top:auto;
}

Here is an article with regards to adding CSS: https://docs.generatepress.com/article/adding-css/#additional-css

Adding it through additional CSS should work.

Hope this helps. Kindly let us know how it goes! :)

This archived topic is closed to new replies.