elegantthemes / create-divi-extension

MIT License
185 stars 58 forks source link

Custom Blog Module grid layout broken #557

Open SRD75 opened 2 years ago

SRD75 commented 2 years ago

Problem Description

I have created a "Blog-ASC" module, which is a simple duplication of the Blog module with an ascending post order.

It is active here.

I've selected the Grid layout, but the content is not displaying in a grid.

Steps To Reproduce

Create the Blog-ASC module.

Add the following to the child theme functions.php:

// Load Custom Divi Module

function divi_custom_blog_module() { 
    get_template_part( '/includes/builder/modules/Blog-ASC' ); 
    $dcfm = new ET_Builder_Module_Blog_ASC(); 
    remove_shortcode( 'et_pb_blog' ); 
    add_shortcode( 'et_pb_blog', array( $dcfm, '_shortcode_callback' ) );
} 

add_action( 'et_builder_ready', 'divi_custom_blog_module' ); 

// Blog Module 'classname' overwrite.
function divi_custom_blog_class( $classlist ) {  
    $classlist['et_pb_blog'] = array( 'classname' => 'ET_Builder_Module_Blog_ASC',); 
    return $classlist; 
} 

add_filter( 'et_module_classes', 'divi_custom_blog_class' );

Add the Blog-ASC module to a page, and select Layout = Grid.

Screenshot 2022-04-23 155536

Help appreciated.

SRD75 commented 2 years ago

Hi Folks,

The problem exists here.

I see one div type has no class:

<div class="et_pb_salvattore_content" data-columns="1">
<div class="">
<article id="post-1380" class="et_pb_post clearfix et_pb_blog_item_0_0 post-1380 post type-post status-publish format-standard has-post-thumbnail hentry category-gold-sponsors">

It should be <div class="column size-1of3">.

Help appreciated.