Home Forums WoodMart support forum Extra content block select (dropdown) options limit increase (show all options)

Extra content block select (dropdown) options limit increase (show all options)

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

    Dear Support!

    In the admin area, on product edit pages, in the Extra content block section (CMB – Custom Meata Boxes):

    The select (dropdown) options are limited to 50 options.

    How can I increase the 50 options to a bigger number, or how can I show all options, because I have more than 50 HTML Blocks?

    I have searched a lot for this 50 “limit” in the template files (CMB2 – Custom Meata Boxes).

    PHP Settings:
    PHP time limit: 300
    PHP max input vars: 1000
    PHP post max size: 128 MB
    SUHOSIN installed: NO
    PHP version: 7.1.11

    Thank you in advance for your help!

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

    Artem Temos
    Keymaster

    Hello,

    Thank you so much purchasing our theme and contacting our support center.

    You can add the following code snippet to the functions.php file in the child theme to increase this limit to 200

    	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;
    	}

    Kind Regards
    XTemos Studio

    #25758

    Thank you Artem!

    You are awesome!

    I love your theme, it has a fantastic build quality, variety of plugins, functionalities, and superb quality of theme design and usability, on both desktop and mobile.

    I am very satisfied with your work, I searched trough wordpress themes a lot, until I found this perfect solution.

    I am considered, that almost all of the wordpress theme developers can learn from you.

    This theme, Woodmart is a great example of the real solutions, not the fake promises, like in case of most of the themes. I mean it does what it promises, and even more.

    However I modified a lot of things in this theme programatically to use as I need, but I am a happy customer, because of the out of the box functions, coding quality (comments and structure) and also because of the support experience.

    I wish you thousands of purchases as soon as possible, because you deserve it.

    #25797

    Artem Temos
    Keymaster

    Thank you so much for your review. It is highly appreciated.

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

The topic ‘Extra content block select (dropdown) options limit increase (show all options)’ is closed to new replies.