Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kpfietek

    (@kpfietek)

    Okay, I’ll look into it further. Thanks so much for your help!

    Thread Starter kpfietek

    (@kpfietek)

    Thanks so much for the quick reply!

    Here’s another video to help explain.
    https://drive.google.com/file/d/1A0bLOBlm2wA4daih11QOYRoCWhDWC07W/view?usp=sharing

    The flow tab was made by a previous person, The products and accessories tabs are new I just copied and pasted to get a new custom post tab but they have the same problem as the CPT UI made custom post tab.

    So it seems that the flow tab has some output edits? How would I go about to find those to also add to the new tabs I created or to the products_2 I created with CPT UI

    Here is the code from the Function.php

    /*
    *	Remove admin toolbar
    */
    add_action('after_setup_theme', 'remove_admin_bar');
    function remove_admin_bar() {
    	if (!current_user_can('administrator') && !is_admin()) {
    	  show_admin_bar(false);
    	}
    }
    
    /*
    *	content filters and shortcodes for text
    */
    function apply_content_filters_shortcodes($content){
    	return apply_filters( 'the_content', do_shortcode($content) );
    }
    add_action('registered_post_type', 'igy2411_make_posts_hierarchical', 10, 2 );
    
    // Runs after each post type is registered
    function igy2411_make_posts_hierarchical($post_type, $pto){
    
        // Return, if not post type posts
        if ($post_type != 'post') return;
    
        // access $wp_post_types global variable
        global $wp_post_types;
    
        // Set post type "post" to be hierarchical
        $wp_post_types['post']->hierarchical = 1;
    
        // Add page attributes to post backend
        // This adds the box to set up parent and menu order on edit posts.
        add_post_type_support( 'post', 'page-attributes' );
    
    }
    add_action( 'init', 'alicat_init' );
    function alicat_init() {
        register_post_type( 'device',
            array(
                    'labels' => array(
                                        'name' => 'Products',
                                    ),
                    'publicly_queryable' => true,
                    'public' => true,
                    'show_ui' => true,
                    'hierarchical' => false,
                    'menu_position' => null,
                    'query_var' => true,
                    'supports' => array('title', 'page-attributes'),
    				'rewrite' => array('slug' => 'product')
                )
        );
    
    	register_post_type( 'devicemodels',
            array(
                    'labels' => array(
                                        'name' => 'Flow',
                                    ),
                    'publicly_queryable' => true,
                    'public' => true,
                    'show_ui' => true,
    				'show_in_menu' => 'edit.php?post_type=device',
                    'hierarchical' => false,
                    'menu_position' => null,
                    'query_var' => true,
                    'supports' => array('title', 'editor'),
    				'rewrite' => array('slug' => 'flow')
                )
        );
    
        register_post_type( 'pressuremodels',
            array(
                    'labels' => array(
                                        'name' => 'Pressure',
                                    ),
                    'publicly_queryable' => true,
                    'public' => true,
                    'show_ui' => true,
    				'show_in_menu' => 'edit.php?post_type=device',
                    'hierarchical' => false,
                    'menu_position' => null,
                    'query_var' => true,
                    'supports' => array('title', 'editor'),
    				'rewrite' => array('slug' => 'pressure')
                )
        );
        	register_post_type( 'accessoriesmodels',
            array(
                    'labels' => array(
                                        'name' => 'accessories',
                                    ),
                    'publicly_queryable' => true,
                    'public' => true,
                    'show_ui' => true,
    				'show_in_menu' => 'edit.php?post_type=device',
                    'hierarchical' => false,
                    'menu_position' => null,
                    'query_var' => true,
                    'supports' => array('title', 'editor'),
    				'rewrite' => array('slug' => '')
                )
        );
Viewing 2 replies - 1 through 2 (of 2 total)