Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter sertefi

    (@sertefi)

    Thread Starter sertefi

    (@sertefi)

    Thanks Alex
    It’s a custom plugin, I am not sure if I can send it by email or any other way.

    Thread Starter sertefi

    (@sertefi)

    I have tested it with wpbakery page builder and it works just fine in the menus.
    I’d like to use yours instead.please if you can help me, I would highly appreciate it

    Thread Starter sertefi

    (@sertefi)

    Thank You Andrew for your response. here is the code I used

    public function register_blocks() {
    
    		$labels = array(
    			'name'                => _x( 'HTML Blocks', 'Post Type General Name', $this->domain ),
    			'singular_name'       => _x( 'HTML Block', 'Post Type Singular Name', $this->domain ),
    			'menu_name'           => __( 'HTML Blocks', $this->domain ),
    			'parent_item_colon'   => __( 'Parent Item:', $this->domain ),
    			'all_items'           => __( 'All Items', $this->domain ),
    			'view_item'           => __( 'View Item', $this->domain ),
    			'add_new_item'        => __( 'Add New Item', $this->domain ),
    			'add_new'             => __( 'Add New', $this->domain ),
    			'edit_item'           => __( 'Edit Item', $this->domain ),
    			'update_item'         => __( 'Update Item', $this->domain ),
    			'search_items'        => __( 'Search Item', $this->domain ),
    			'not_found'           => __( 'Not found', $this->domain ),
    			'not_found_in_trash'  => __( 'Not found in Trash', $this->domain ),
    		);
    
    		$args = array(
    			'label'               => __( 'cms_block', $this->domain ),
    			'description'         => __( 'CMS Blocks for custom HTML to place in your pages', $this->domain ),
    			'labels'              => $labels,
    			//'supports'            => array( 'title', 'editor' ),
    			'hierarchical'        => false,
    			'public'              => true,
    			'show_ui'             => true,
    			'show_in_menu'        => true,
    			'show_in_nav_menus'   => true,
    			'show_in_admin_bar'   => true,
    			'menu_position'       => 99,
    			'menu_icon'           => 'dashicons-schedule',
    			'can_export'          => true,
    			'has_archive'         => true,
    			'exclude_from_search' => true,
    			'publicly_queryable'  => true,
    			'rewrite'             => true,
    			//'capability_type'     => 'page',
    		);
    
    		register_post_type( 'cms_block', $args );
    
    	}

    It’s a post type for an HTML block shortcode I am using to display on a mega menu.
    I customize the HTML block then I call it on the menus.
    I have checked out the preview of the post type page, the builder works properly there. builder css has been called properly). but not on the shortcode.no grids are applied.

    Thread Starter sertefi

    (@sertefi)

    Found it,it was as easy as I thought, if anyone needs it.

    global $mspdb;
    $master_sliders = $mspdb->get_sliders();
    foreach (  $master_sliders as $slider_id ) {
    echo $slider_id['ID'];
     }

    Thanks guys

    Thread Starter sertefi

    (@sertefi)

    Thanks alot for your help.
    I used this code bellow to display all the arrays data from sliders
    <?php
    global $mspdb;
    $master_sliders = $mspdb->get_sliders();
    print_r( $master_sliders );
    ?>

    is there any little snippet to display only the list of ID using the code bellow.I tried all the ways possible(for me since I am not that devy)
    I would appreciate if you can help me with that.

Viewing 6 replies - 1 through 6 (of 6 total)