Max HTML Blocks Bug/Limit?
-
Hello,
The Extra Content Block in the edit product page as well as any element that processes HTML Blocks is not able to show more than 50 results.
Is this a bug or a limit? If so can I bypass this limit?
Best regards.
Attachments:
You must be
logged in to view attached files.
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
That worked perfectly. Thank you very much!
Best regards.
The topic ‘Max HTML Blocks Bug/Limit?’ is closed to new replies.