Home Forums WoodMart support forum I would like to organize the design of the category menu like your sample.

I would like to organize the design of the category menu like your sample.

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

    bikikorea
    Participant

    In the Admin menu, I created a menu in categories.

    So I tried to organize the menu like your sample design.

    However, the list I made in [HTML Block for the dropdown] does not appear.

    I guess there are about 322 of my HTML BLOCKS.

    Do you have too many numbers to apply? Only part of it is coming out.

    Details will be sent with the video attached. please answer about my question.

    Thank you.

    Video of the problem : https://youtu.be/6IUQq8RfeYo

    #140358

    Eric Watson
    Participant

    Hello,

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

    function woodmart_get_static_blocks_array( $new = false ) {
    		$args = array( 'posts_per_page' => 500, '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;
    	}

    Kind Regards
    XTemos Studio

    #140360

    bikikorea
    Participant

    How can I configure it like your sample?
    After making the html block as a test, selecting and saving does not apply.

    Can you give me an example or how?

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

    Eric Watson
    Participant

    The code that we gave above increased the number of HTML blocks in the selection. Now you can select the block you need.
    http://prntscr.com/oxkpap

    Kind Regards
    XTemos Studio

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