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

Max HTML Blocks Bug/Limit?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #30597

    PoliSafety IT
    Participant

    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.
    #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

    #30606

    PoliSafety IT
    Participant

    That worked perfectly. Thank you very much!

    Best regards.

    #30625

    Artem Temos
    Keymaster

    You are welcome!

Tagged: , , , ,

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Max HTML Blocks Bug/Limit?’ is closed to new replies.