{"id":344678,"date":"2022-07-19T13:50:17","date_gmt":"2022-07-19T13:50:17","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=344678"},"modified":"2024-06-18T11:18:58","modified_gmt":"2024-06-18T11:18:58","slug":"removing-specific-category-from-category-menu-programmatically","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/","title":{"rendered":"Remove Specific Category From Category Menu programmatically in Magento 2"},"content":{"rendered":"\n<p>Hello Friends!!!<br><br>In this blog, we are going to learn how we can remove a specific category from the category menu at the frontend.<\/p>\n\n\n\n<p>Here, in the following example, I have added a filter of category name to remove from the menu.<br>I have created a preference for the class <strong>Magento\\Catalog\\Plugin\\Block\\Topmenu<\/strong><br>Please follow the below steps to achieve the desired result.<\/p>\n\n\n\n<p><strong>Step1:<\/strong> Create <em>di.xml <\/em>file inside the <em>app\/code\/Webkul\/CustomModule\/etc\/<\/em> directory.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?xml version=&quot;1.0&quot;?&gt;\n&lt;!--\n\/**\n * Webkul Software.\n *\n * @category  Webkul\n * @package   Webkul_CustomModule\n * @author    Webkul Software Private Limited\n * @copyright Webkul Software Private Limited (https:\/\/webkul.com)\n * @license   https:\/\/store.webkul.com\/license.html\n *\/\n--&gt;\n&lt;config xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:ObjectManager\/etc\/config.xsd&quot;&gt;\n    &lt;preference for=&quot;Magento\\Catalog\\Plugin\\Block\\Topmenu&quot; \n        type=&quot;Webkul\\CustomModule\\Plugin\\Catalog\\Block\\Topmenu&quot;\/&gt;\n&lt;\/config&gt;<\/pre>\n\n\n\n<p><strong>Step2:<\/strong> Now, create the <em>Topmenu.php<\/em> file inside the <em>app\/code\/Webkul\/CustomModule\/Plugin\/Catalog\/Block\/<\/em> directory.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n\/**\n * Webkul Software.\n *\n * @category  Webkul\n * @package   Webkul_CustomModule\n * @author    Webkul Software Private Limited\n * @copyright Webkul Software Private Limited (https:\/\/webkul.com)\n * @license   https:\/\/store.webkul.com\/license.html\n *\/\ndeclare(strict_types=1);\n\nnamespace Webkul\\CustomModule\\Plugin\\Catalog\\Block;\n\nuse Magento\\Catalog\\Model\\Category;\nuse Magento\\Framework\\Data\\Collection;\nuse Magento\\Framework\\Data\\Tree\\Node;\nuse Magento\\Catalog\\Model\\ResourceModel\\Category\\StateDependentCollectionFactory;\n\n\/**\n * Plugin for top menu block\n *\/\nclass Topmenu extends \\Magento\\Catalog\\Plugin\\Block\\Topmenu\n{\n    \/**\n     * @var StateDependentCollectionFactory\n     *\/\n    private $collectionFactory;\n\n    \/**\n     * Initialize dependencies.\n     *\n     * @param \\Magento\\Catalog\\Helper\\Category $catalogCategory\n     * @param StateDependentCollectionFactory $categoryCollectionFactory\n     * @param \\Magento\\Store\\Model\\StoreManagerInterface $storeManager\n     * @param \\Magento\\Catalog\\Model\\Layer\\Resolver $layerResolver\n     * @return void\n     *\/\n    public function __construct(\n        \\Magento\\Catalog\\Helper\\Category $catalogCategory,\n        StateDependentCollectionFactory $categoryCollectionFactory,\n        \\Magento\\Store\\Model\\StoreManagerInterface $storeManager,\n        \\Magento\\Catalog\\Model\\Layer\\Resolver $layerResolver\n    ) {\n        $this-&gt;catalogCategory = $catalogCategory;\n        $this-&gt;collectionFactory = $categoryCollectionFactory;\n        $this-&gt;storeManager = $storeManager;\n        $this-&gt;layerResolver = $layerResolver;\n\n        parent::__construct(\n            $catalogCategory,\n            $categoryCollectionFactory,\n            $storeManager,\n            $layerResolver\n        );\n    }\n\n    \/**\n     * Get Category Tree\n     *\n     * @param int $storeId\n     * @param int $rootId\n     * @return \\Magento\\Catalog\\Model\\ResourceModel\\Category\\Collection\n     * @throws \\Magento\\Framework\\Exception\\LocalizedException\n     *\/\n    protected function getCategoryTree($storeId, $rootId)\n    {\n        \/** @var \\Magento\\Catalog\\Model\\ResourceModel\\Category\\Collection $collection *\/\n        $collection = $this-&gt;collectionFactory-&gt;create();\n        $collection-&gt;setStoreId($storeId);\n        $collection-&gt;addAttributeToSelect(&#039;name&#039;);\n\n        \/\/\/\/add category name filter\/\/\/\/\n        $collection-&gt;addAttributeToFilter(&#039;name&#039;, &#091;&quot;neq&quot;=&gt;&quot;Shoes&quot;]);\n        \/\/\/\/\/\/\/\n        \n        $collection-&gt;addFieldToFilter(&#039;path&#039;, &#091;&#039;like&#039; =&gt; &#039;1\/&#039; . $rootId . &#039;\/%&#039;]); \/\/load only from store root\n        $collection-&gt;addAttributeToFilter(&#039;include_in_menu&#039;, 1);\n        $collection-&gt;addIsActiveFilter();\n        $collection-&gt;addNavigationMaxDepthFilter();\n        $collection-&gt;addUrlRewriteToResult();\n        $collection-&gt;addOrder(&#039;level&#039;, Collection::SORT_ORDER_ASC);\n        $collection-&gt;addOrder(&#039;position&#039;, Collection::SORT_ORDER_ASC);\n        $collection-&gt;addOrder(&#039;parent_id&#039;, Collection::SORT_ORDER_ASC);\n        $collection-&gt;addOrder(&#039;entity_id&#039;, Collection::SORT_ORDER_ASC);\n\n        return $collection;\n    }\n}<\/pre>\n\n\n\n<p>Now, look into the first image in which category <strong>Shoes<\/strong> is being displayed in the menu. And in the second image, the category <strong>Shoes<\/strong> is removed from the menu.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"615\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-16-59-1200x615.png\" alt=\"Screenshot-from-2022-07-19-19-16-59\" class=\"wp-image-344686\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-16-59-1200x615.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-16-59-300x154.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-16-59-250x128.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-16-59-768x393.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-16-59.png 1302w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><figcaption class=\"wp-element-caption\">Image with &#8216;Shoes&#8217; Category in Top Navigation <\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"618\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-17-57-1200x618.png\" alt=\"Screenshot-from-2022-07-19-19-17-57\" class=\"wp-image-344689\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-17-57-1200x618.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-17-57-300x155.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-17-57-250x129.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-17-57-768x396.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-17-57.png 1298w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><figcaption class=\"wp-element-caption\">Image without &#8216;Shoes&#8217; Category in Top Navigation <\/figcaption><\/figure>\n\n\n\n<p>Hope this will be helpful.<br>Thanks \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello Friends!!! In this blog, we are going to learn how we can remove a specific category from the category menu at the frontend. Here, in the following example, I have added a filter of category name to remove from the menu.I have created a preference for the class Magento\\Catalog\\Plugin\\Block\\TopmenuPlease follow the below steps to <a href=\"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":249,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,9121],"tags":[12929,12931,12930,12928],"class_list":["post-344678","post","type-post","status-publish","format-standard","hentry","category-magento","category-magento-2","tag-remove-category-from-menu","tag-remove-specific-category-from-category-menu-programmatically","tag-remove-specific-category-from-navigation-programmatically","tag-removing-specific-category-from-category-menu-programmatically"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Remove Specific Category From Category Menu programmatically in Magento 2 - Webkul Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Remove Specific Category From Category Menu programmatically in Magento 2 - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Hello Friends!!! In this blog, we are going to learn how we can remove a specific category from the category menu at the frontend. Here, in the following example, I have added a filter of category name to remove from the menu.I have created a preference for the class MagentoCatalogPluginBlockTopmenuPlease follow the below steps to [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-19T13:50:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-18T11:18:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-16-59-1200x615.png\" \/>\n<meta name=\"author\" content=\"Khushboo Sahu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Khushboo Sahu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/\"},\"author\":{\"name\":\"Khushboo Sahu\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/f94b8f53397bf85810761d76c98fadca\"},\"headline\":\"Remove Specific Category From Category Menu programmatically in Magento 2\",\"datePublished\":\"2022-07-19T13:50:17+00:00\",\"dateModified\":\"2024-06-18T11:18:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/\"},\"wordCount\":153,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-16-59-1200x615.png\",\"keywords\":[\"Remove category from menu\",\"Remove Specific Category From Category Menu programmatically\",\"Remove specific category from navigation programmatically\",\"Removing Specific Category From Category Menu programmatically\"],\"articleSection\":[\"magento\",\"Magento 2\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/\",\"url\":\"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/\",\"name\":\"Remove Specific Category From Category Menu programmatically in Magento 2 - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-16-59-1200x615.png\",\"datePublished\":\"2022-07-19T13:50:17+00:00\",\"dateModified\":\"2024-06-18T11:18:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-16-59.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-16-59.png\",\"width\":1302,\"height\":667,\"caption\":\"Screenshot-from-2022-07-19-19-16-59\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Remove Specific Category From Category Menu programmatically in Magento 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/f94b8f53397bf85810761d76c98fadca\",\"name\":\"Khushboo Sahu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cabac965df656d114e6bf340df07518c990eda03bb09265dbd5c17f1097adaae?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cabac965df656d114e6bf340df07518c990eda03bb09265dbd5c17f1097adaae?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g\",\"caption\":\"Khushboo Sahu\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/khushboo-sahu062\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Remove Specific Category From Category Menu programmatically in Magento 2 - Webkul Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/","og_locale":"en_US","og_type":"article","og_title":"Remove Specific Category From Category Menu programmatically in Magento 2 - Webkul Blog","og_description":"Hello Friends!!! In this blog, we are going to learn how we can remove a specific category from the category menu at the frontend. Here, in the following example, I have added a filter of category name to remove from the menu.I have created a preference for the class MagentoCatalogPluginBlockTopmenuPlease follow the below steps to [...]","og_url":"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2022-07-19T13:50:17+00:00","article_modified_time":"2024-06-18T11:18:58+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-16-59-1200x615.png","type":"","width":"","height":""}],"author":"Khushboo Sahu","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Khushboo Sahu","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/"},"author":{"name":"Khushboo Sahu","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/f94b8f53397bf85810761d76c98fadca"},"headline":"Remove Specific Category From Category Menu programmatically in Magento 2","datePublished":"2022-07-19T13:50:17+00:00","dateModified":"2024-06-18T11:18:58+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/"},"wordCount":153,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-16-59-1200x615.png","keywords":["Remove category from menu","Remove Specific Category From Category Menu programmatically","Remove specific category from navigation programmatically","Removing Specific Category From Category Menu programmatically"],"articleSection":["magento","Magento 2"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/","url":"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/","name":"Remove Specific Category From Category Menu programmatically in Magento 2 - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-16-59-1200x615.png","datePublished":"2022-07-19T13:50:17+00:00","dateModified":"2024-06-18T11:18:58+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-16-59.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Screenshot-from-2022-07-19-19-16-59.png","width":1302,"height":667,"caption":"Screenshot-from-2022-07-19-19-16-59"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/removing-specific-category-from-category-menu-programmatically\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Remove Specific Category From Category Menu programmatically in Magento 2"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/f94b8f53397bf85810761d76c98fadca","name":"Khushboo Sahu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cabac965df656d114e6bf340df07518c990eda03bb09265dbd5c17f1097adaae?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cabac965df656d114e6bf340df07518c990eda03bb09265dbd5c17f1097adaae?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g","caption":"Khushboo Sahu"},"url":"https:\/\/webkul.com\/blog\/author\/khushboo-sahu062\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/344678","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/249"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=344678"}],"version-history":[{"count":8,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/344678\/revisions"}],"predecessor-version":[{"id":448520,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/344678\/revisions\/448520"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=344678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=344678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=344678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}