Home Forums WoodMart support forum Update theme – html blocks

Update theme – html blocks

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #143285

    Stanley Black
    Participant

    Hello,

    If you update product which was made before theme was updated html blocks disappeared.
    All products made after theme was updated work normally. Them you can update without a problem.

    Also extra content block on product page now show up maximum 200 html blocks but I have more than 1400.

    How to fix this issue?

    Kind regards

    #143287

    Stanley Black
    Participant

    To be more clearly, html block disappeared from product page(extra content block).

    They still exist when you go to HTML Block > All items.

    But I can’t choose them from product page.
    Only html blocks cretaed after theme was updated will show up.

    Kind regards

    #143416

    Stanley Black
    Participant

    Hello,

    Can you provide me any answer?

    Is it possible to fix this or I need to create again more then 1000 html blocks.

    Kind regards

    #143427

    Hello,

    I am checking product which was created in June, before the theme update and I see the drop-down with the possibility to chose HTML block https://gyazo.com/1b10382065346d70c0c8dea1474a0953

    It is shown on the product page.

    Please provide the product page example with the problem. Please try to check the problem in condition of all the third parties plugins deactivated.

    Best Regards

    #143435

    Stanley Black
    Participant

    It is possible to choose only latest 200 html blocks.

    You chose Blava html block created 2 days before.

    Limit is problem. Theme updated is not a problem.

    How to icrease limit to 2000 in extra content block.

    You can see in screenshot when I add new html block latest one disappeared from extra conetent block.

    Html block Dining chair just disappeared because limit is 200.

    Kind regards

    Attachments:
    You must be logged in to view attached files.
    #143452

    Artem Temos
    Keymaster

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

    function woodmart_get_static_blocks_array( $new = false ) {
            $args = array( 'posts_per_page' => 2500, 'post_type' => 'cms_block' );
            $blocks_posts = get_posts( $args );
            $array = array();
            foreach ( $blocks_posts as $post ) :
                setup_postdata( $post );
                if ( $new ) {
                    $array[ $post->ID ] = array(
                        'name' => $post->post_title,
                        'value' => $post->ID,
                    );
                } else {
                    $array[ $post->post_title ] = $post->ID;
                }
            endforeach;
            wp_reset_postdata();
            return $array;
        }
    #143455

    Stanley Black
    Participant

    Thank you!!!

    Best support!

    #143487

    Artem Temos
    Keymaster

    You are welcome.

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

The topic ‘Update theme – html blocks’ is closed to new replies.