{"id":5508741,"date":"2014-11-23T03:12:03","date_gmt":"2014-11-23T03:12:03","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/how-do-you-remove-post_type-page-from-menu-link\/"},"modified":"2016-08-22T12:51:18","modified_gmt":"2016-08-22T12:51:18","slug":"how-do-you-remove-post_type-page-from-menu-link","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/how-do-you-remove-post_type-page-from-menu-link\/","title":{"rendered":"How do you remove &quot;post_type page&quot; from menu link?"},"content":{"rendered":"<p>I&#8217;m trying to remove some elements from a menu link.<\/p>\n<p>At the moment I&#8217;ve trimmed back the output so the menu link contains just the following:<\/p>\n<p>&lt;li class=&#8221;home post_type page&#8221;&gt;<\/p>\n<p>However, that&#8217;s as far as I&#8217;ve been able to trim things back to.<\/p>\n<p>My aim is to only have the following showing<\/p>\n<p>&lt;li class=&#8221;home&#8221;&gt;<\/p>\n<p>To get to the above I&#8217;ve modified the &#8220;nav-menu-template.php&#8221; file. I know I shouldn&#8217;t be touching core files but this was the easiest way to understand how the links are created.<\/p>\n<p>So far I do know that this:<\/p>\n<p>$class_names = $class_names ? &#8216; class=&#8221;&#8216; . esc_attr( $class_names ) . &#8216;&#8221;&#8216; : &#8221;;<\/p>\n<p>is what provides the output. The only bit I don&#8217;t know is how to stop the output from including &#8220;post_type page&#8221;<\/p>\n<p>This would then give me just the following<\/p>\n<p>&lt;li class=&#8221;home&#8221;&gt;<\/p>\n<p>I&#8217;ve tried removing all the obvious things within the &#8220;nav-menu-template.php&#8221; file that might be generating the &#8220;post_type page&#8221; text but so far without luck.<\/p>\n<p>Any suggestions on where I should be looking would be greatly appreciated.<\/p>\n","protected":false},"template":"","class_list":["post-5508741","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5508741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5508741\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=5508741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}