Title: deswork's Replies | WordPress.org

---

# deswork

  [  ](https://wordpress.org/support/users/deswork/)

 *   [Profile](https://wordpress.org/support/users/deswork/)
 *   [Topics Started](https://wordpress.org/support/users/deswork/topics/)
 *   [Replies Created](https://wordpress.org/support/users/deswork/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/deswork/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/deswork/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/deswork/engagements/)
 *   [Favorites](https://wordpress.org/support/users/deswork/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Adding current-menu-item to custom post type single page](https://wordpress.org/support/topic/adding-current-menu-item-to-custom-post-type-single-page/)
 *  Thread Starter [deswork](https://wordpress.org/support/users/deswork/)
 * (@deswork)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/adding-current-menu-item-to-custom-post-type-single-page/#post-13681666)
 * 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)