{"id":304,"date":"2016-12-15T00:10:17","date_gmt":"2016-12-14T22:10:17","guid":{"rendered":"http:\/\/itsimple.info\/?p=304"},"modified":"2016-12-15T00:10:17","modified_gmt":"2016-12-14T22:10:17","slug":"simple-way-to-add-horizontal-categories-menu-in-wordpress-without-css","status":"publish","type":"post","link":"https:\/\/itsimple.info\/?p=304","title":{"rendered":"Simple way to add horizontal categories menu in WordPress without CSS"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>To create a horizontal categories menu separated by &#8216; | &#8216; in WordPress, use this code.<\/p>\n<p><code>&lt;?php<br \/>\necho str_replace('&lt;br \/&gt;',' | ',<br \/>\nwp_list_categories('style=&amp;echo=0&amp;title_li='));<br \/>\n?&gt;<br \/>\n<\/code><br \/>\nIf you want to exclude category from the menu then add this code, Example to exclude category with id=2 :<\/p>\n<pre><code>&lt;pre&gt;&lt;code&gt;wp_list_categories('style=&amp;echo=0&amp;title_li=&amp;exclude=2');&lt;\/code&gt;&lt;\/pre&gt;\r\n\r\n<\/code><\/pre>\n<p>To find the category id,<br \/>\n1. go to Posts &gt; Categories.<br \/>\n2. Hover to any category name, and look at your browser status bar. Look for something like `&#8230;&amp;tag_ID=2&#8230;`. In this case, the category id is 2.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; To create a horizontal categories menu separated by &#8216; | &#8216; in WordPress, use this code. &lt;?php echo str_replace(&#8216;&lt;br \/&gt;&#8217;,&#8217; | &#8216;, wp_list_categories(&#8216;style=&amp;echo=0&amp;title_li=&#8217;)); ?&gt; If you want to exclude category from the menu then add this code, Example to exclude category with id=2 : &lt;pre&gt;&lt;code&gt;wp_list_categories(&#8216;style=&amp;echo=0&amp;title_li=&amp;exclude=2&#8217;);&lt;\/code&gt;&lt;\/pre&gt; To find the category id, 1. go to Posts [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-304","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=304"}],"version-history":[{"count":0,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/304\/revisions"}],"wp:attachment":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}