Home Forums WoodMart support forum Max HTML Blocks Bug/Limit? Reply To: Max HTML Blocks Bug/Limit?

#30603

Artem Temos
Keymaster

Hi,

Try to add the following PHP code snippet to the child theme functions.php file to increase this limit

function woodmart_get_static_blocks_array() {
        $args = array( 'posts_per_page' => 200, 'post_type' => 'cms_block' );
        $blocks_posts = get_posts( $args );
        $array = array();
        foreach ( $blocks_posts as $post ) : 
            setup_postdata( $post ); 
            $array[$post->post_title] = $post->ID; 
        endforeach;
        wp_reset_postdata();
        return $array;
    }

Regards