Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter deswork

    (@deswork)

    Hi,

    I added the news to the menu using ‘Add menu items’ selecting the News dropdown then adding News from the view all list. It’s showing as a ‘Post Type Archive’ in the menu structure.

    When on the news article page the current-menu-item class is not in the list of classes applied.

    This is the code I used to create the News custom post type.

    $args = array (
    		'labels' => array(
    			'name' => 'News',
    			'singular_name' => 'news',
    		),
    		'hierarchical' => true,
    		'public' => true,
    		'has_archive' => true,
    		'menu_icon' => 'dashicons-text-page',
    		'supports' => array('title', 'editor', 'thumbnail'),
    	);
    	
    	register_post_type('news', $args);
    
Viewing 1 replies (of 1 total)