Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
wp_setup_nav_menu_item の Hotfix
Plugin Name: #35324 hotfix
Plugin URI:
Description: This will fix a bug of post type archives support in nav menus.
Author: Toro_Unit, extendwings, mayukojpn
Author URI:
Version: 0.1
add_filter('wp_setup_nav_menu_item', function( $menu_item ) {
if ( isset( $menu_item->post_type ) && ( 'post_type_archive' == $menu_item->type ) ) {
$menu_item->description = $menu_item->post_content;
return $menu_item;

This comment has been minimized.

Copy link

@phtester3 phtester3 commented Feb 26, 2016

doesnt working anymore since latest updates from facebook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.