{"id":752,"date":"2022-11-05T00:12:37","date_gmt":"2022-11-05T00:12:37","guid":{"rendered":"https:\/\/3d-imaging.co.uk\/blog\/?p=752"},"modified":"2024-07-30T12:49:37","modified_gmt":"2024-07-30T12:49:37","slug":"wordpress-categories-automatically-add-to-menu","status":"publish","type":"post","link":"https:\/\/3d-imaging.co.uk\/blog\/wordpress-categories-automatically-add-to-menu\/","title":{"rendered":"WordPress Categories Automatically Add to Menu"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column][vc_column_text css=&#8221;&#8221;]Use the &#8220;JC Submenu&#8221; plugin and in theme functions.php add this code:<\/p>\n<p>\/\/Enable compatibility with theme custom menu walkers<\/p>\n<p>add_filter(&#8216;jcs\/enable_public_walker&#8217;, &#8216;jc_disable_public_walker&#8217;);<\/p>\n<p>function jc_disable_public_walker($default){<br \/>\nreturn false;<br \/>\n}<\/p>\n<p>From <a href=\"https:\/\/stackoverflow.com\/questions\/43425538\/how-to-automatically-add-categories-sub-categories-in-wordpress-nav-menu\">here<\/a><\/p>\n<p>and follow this video:<br \/>\n[\/vc_column_text]<div class=\"gem-youtube gem-wrapbox gem-wrapbox-style-no-style rounded-corners gem-wrapbox-position-below\" style=\"width: 100%;\"><div class=\"gem-wrapbox-inner gem-ratio-style\" style=\"padding-top: 56.25%\"><iframe class=\"gem-wrapbox-element img-responsive\" width=\"100%\" height=\"100\" allowfullscreen=\"allowfullscreen\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"\/\/www.youtube.com\/embed\/EP1-Bhfceq4?rel=0&amp;wmode=opaque\"><\/iframe><\/div><\/div>[\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text css=&#8221;&#8221;]To add a list of subcategories automatically under one of the primary menus:<br \/>\n<img width=\"1160\" height=\"1302\" class=\"alignnone size-full wp-image-857 \" src=\"https:\/\/3d-imaging.co.uk\/blog\/wp-content\/uploads\/2022\/11\/img_6381f0ab6c8b8.png\" alt=\"\" srcset=\"https:\/\/3d-imaging.co.uk\/blog\/wp-content\/uploads\/2022\/11\/img_6381f0ab6c8b8.png 1160w, https:\/\/3d-imaging.co.uk\/blog\/wp-content\/uploads\/2022\/11\/img_6381f0ab6c8b8-267x300.png 267w, https:\/\/3d-imaging.co.uk\/blog\/wp-content\/uploads\/2022\/11\/img_6381f0ab6c8b8-912x1024.png 912w, https:\/\/3d-imaging.co.uk\/blog\/wp-content\/uploads\/2022\/11\/img_6381f0ab6c8b8-768x862.png 768w\" sizes=\"(max-width: 1160px) 100vw, 1160px\" \/><\/p>\n<p>To add a list of posts underneath one of the primary menus:<br \/>\n<img width=\"979\" height=\"1194\" class=\"alignnone size-full wp-image-855 \" src=\"https:\/\/3d-imaging.co.uk\/blog\/wp-content\/uploads\/2022\/11\/img_6381eeb26392e.png\" alt=\"\" srcset=\"https:\/\/3d-imaging.co.uk\/blog\/wp-content\/uploads\/2022\/11\/img_6381eeb26392e.png 979w, https:\/\/3d-imaging.co.uk\/blog\/wp-content\/uploads\/2022\/11\/img_6381eeb26392e-246x300.png 246w, https:\/\/3d-imaging.co.uk\/blog\/wp-content\/uploads\/2022\/11\/img_6381eeb26392e-840x1024.png 840w, https:\/\/3d-imaging.co.uk\/blog\/wp-content\/uploads\/2022\/11\/img_6381eeb26392e-768x937.png 768w\" sizes=\"(max-width: 979px) 100vw, 979px\" \/>[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>[vc_row][vc_column][vc_column_text css=&#8221;&#8221;]Use the &#8220;JC Submenu&#8221; plugin and in theme functions.php add this code: \/\/Enable compatibility with theme custom menu walkers&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"__cvm_playback_settings":[],"__cvm_video_id":"","footnotes":""},"categories":[1],"tags":[],"yst_prominent_words":[],"class_list":{"0":"post-752","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-3d-news"},"menu_order":0,"_links":{"self":[{"href":"https:\/\/3d-imaging.co.uk\/blog\/wp-json\/wp\/v2\/posts\/752","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/3d-imaging.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/3d-imaging.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/3d-imaging.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/3d-imaging.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=752"}],"version-history":[{"count":1,"href":"https:\/\/3d-imaging.co.uk\/blog\/wp-json\/wp\/v2\/posts\/752\/revisions"}],"predecessor-version":[{"id":1312,"href":"https:\/\/3d-imaging.co.uk\/blog\/wp-json\/wp\/v2\/posts\/752\/revisions\/1312"}],"wp:attachment":[{"href":"https:\/\/3d-imaging.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=752"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/3d-imaging.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=752"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/3d-imaging.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=752"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/3d-imaging.co.uk\/blog\/wp-json\/wp\/v2\/yst_prominent_words?post=752"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}