Forum Replies Created

Viewing 7 replies - 16 through 22 (of 22 total)
  • Find the header div class or html tag and apply background color in css.

    Hello @dbee78,

    You can send me few public files and I will show you how to convert them.

    Yes, you are going good way, then you need to map page with the same slug and assign page template name.

    Just let me know.

    hellojesse

    (@egyptimhotep)

    @lovebexa Did you figure out how to fix this linking issue?

    hellojesse

    (@egyptimhotep)

    @611shabnam I can confirm that there is some bug in linking CPT and form. It doesn’t post tags and categories. Above I sent my Custom post type function.

    I believe it is bug.

    hellojesse

    (@egyptimhotep)

    // CPT portfolio
    
    add_action('init','create_post_type');
    add_action('init','create_taxonomies');
    
    	function create_post_type() {
    		$labels = array(
    			'name'               => 'Portfolios',
    			'singular_name'      => 'Portfolio',
    			'menu_name'          => 'Portfolios',
    			'name_admin_bar'     => 'Portfolio',
    			'add_new'            => 'Add New',
    			'add_new_item'       => 'Add New Portfolio',
    			'new_item'           => 'New Portfolio',
    			'edit_item'          => 'Edit Portfolio',
    			'view_item'          => 'View Portfolio',
    			'all_items'          => 'All Portfolios',
    			'search_items'       => 'Search Portfolios',
    			'parent_item_colon'  => 'Parent Portfolio',
    			'not_found'          => 'No Portfolios Found',
    			'not_found_in_trash' => 'No Portfolios Found in Trash'
    		);
    
    		$args = array(
    			'labels'              => $labels,
    			'public'              => true,
    			'exclude_from_search' => false,
    			'publicly_queryable'  => true,
    			'show_ui'             => true,
    			'show_in_nav_menus'   => true,
    			'show_in_menu'        => true,
    			'show_in_admin_bar'   => true,
    			'menu_position'       => 80,
    			'menu_icon'           => 'dashicons-format-gallery',
    			'capability_type'     => 'post',
    			'hierarchical'        => false,
    			'supports'            => array( 'title', 'editor', 'author', 'thumbnail', 'comments', 'custom-fields' ),
    			'has_archive'         => true,
    			'rewrite'             => array( 'slug' => 'portfolio' ),
    			'query_var'           => true
    		);
    
    		register_post_type( 'oi_portfolio', $args );
    	}
    
    	function create_taxonomies() {
    
    		// Add new taxonomy, make it hierarchical (like categories)
    		$labels = array(
    			'name'              => 'Portfolio Categories',
    			'singular_name'     => 'Portfolio Category',
    			'search_items'      => 'Search Portfolio Categories',
    			'all_items'         => 'All Portfolio Categories',
    			'parent_item'       => 'Parent Portfolio Category',
    			'parent_item_colon' => 'Parent Portfolio Category:',
    			'edit_item'         => 'Edit Portfolio Category',
    			'update_item'       => 'Update Portfolio Category',
    			'add_new_item'      => 'Add New Portfolio Category',
    			'new_item_name'     => 'New Portfolio Category Name',
    			'menu_name'         => 'Portfolio Categories',
    		);
    
    		$args = array(
    			'hierarchical'      => true,
    			'labels'            => $labels,
    			'show_ui'           => true,
    			'show_admin_column' => true,
    			'query_var'         => true,
    			'rewrite'           => array( 'slug' => 'portfolio_category' ),
    		);
    
            register_taxonomy('oi_portfolio_categories',array('oi_portfolio'),$args);
    
    		// Add new taxonomy, NOT hierarchical (like tags)
    		$labels = array(
    			'name'                       => 'Portfolio Tags',
    			'singular_name'              => 'Portfolio Tag',
    			'search_items'               => 'Portfolio Tags',
    			'popular_items'              => 'Popular Portfolio Tags',
    			'all_items'                  => 'All Portfolio Tags',
    			'parent_item'                => null,
    			'parent_item_colon'          => null,
    			'edit_item'                  => 'Edit Portfolio Tag',
    			'update_item'                => 'Update Portfolio Tag',
    			'add_new_item'               => 'Add New Portfolio Tag',
    			'new_item_name'              => 'New Portfolio Tag Name',
    			'separate_items_with_commas' => 'Separate Portfolio Tags with commas',
    			'add_or_remove_items'        => 'Add or remove Portfolio Tags',
    			'choose_from_most_used'      => 'Choose from most used Portfolio Tags',
    			'not_found'                  => 'No Portfolio Tags found',
    			'menu_name'                  => 'Portfolio Tags',
    		);
    
    		$args = array(
    			'hierarchical'          => false,
    			'labels'                => $labels,
    			'show_ui'               => true,
    			'show_admin_column'     => true,
    			'update_count_callback' => '_update_post_term_count',
    			'query_var'             => true,
    			'rewrite'               => array( 'slug' => 'portfolio_tag' ),
    		);
    
            register_taxonomy('oi_portfolio_tags','oi_portfolio',$args);
    
    }
    hellojesse

    (@egyptimhotep)

    @lovebexa

    If I create CPT Title and Content is submitted but Categories and Tags are ignored. Those fields are empty.

    I am using function of wordpress, no prlugin required.

    • This reply was modified 5 years ago by hellojesse.
    Forum: Fixing WordPress
    In reply to: screen options

    Screen option not working. Click on tab and no fields are there. Latest update and default theme has been used and trunk version also. It seems to be a bug!

Viewing 7 replies - 16 through 22 (of 22 total)