{"id":368470,"date":"2025-10-23T11:24:12","date_gmt":"2025-10-23T05:24:12","guid":{"rendered":"https:\/\/directorist.com\/?post_type=docs&#038;p=368470"},"modified":"2025-10-23T11:24:25","modified_gmt":"2025-10-23T05:24:25","password":"","slug":"single-category-page","status":"publish","type":"docs","link":"https:\/\/directorist.com\/docs\/single-category-page\/","title":{"rendered":"Single Category Page"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Single Category<\/h2>\n\n\n\n<p>You can display all listings of a single category using the following shortcode. Remember, if you visit the page after adding this\u00a0<code>[directorist_category]<\/code>\u00a0shortcode\u00a0<strong>directly<\/strong>, you will see something like this \u2018No Results Found.\u2019 message. It is because the Directorist plugin will use the page with this shortcode to display all listings of a specific category dynamically when a user clicks on a single category anywhere on your website. In other words, this page is not for direct access so it is better not to include the page with this shortcode in the nav menu.\u00a0<br><br><strong>Single Category Shortcode:<\/strong>\u00a0<code>[directorist_category]<\/code>\u00a0The shortcode\u00a0<code>[directorist_category]<\/code>\u00a0has a number of parameters to customize the output. Let\u2019s have a look at the available attributes\/parameters and their available values with some description. <\/p>\n\n\n\n<p>Attributes\/Parameters:  <\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>view<\/strong>: You can display all listings of a category in a list, grid, or map layout. Available Options: list, grid, and map view. The default value is the grid.<br><br>Example:\u00a0[directorist_category view=&#8221;grid&#8221;]<br><\/li>\n\n\n\n<li><strong>order by<\/strong>: You can order all listings of a category using this parameter. Options available: title, date &amp; price. The default is the date. <br><br>Example:\u00a0[directorist_category orderby=&#8221;date&#8221;]  <br><\/li>\n\n\n\n<li><strong>order<\/strong>: You can sort all listings of a category in ascending or descending order. <br>Options available: asc | desc. The default is asc. <br><br>Example:\u00a0[directorist_category order=&#8221;asc&#8221;] <br><\/li>\n\n\n\n<li><strong>Logged_in_user_only<\/strong>: You can make a single category only visible for the logged-in users using this parameter. Options available: yes | no. Example:<br><br>\u00a0[directorist_category logged_in_user_only=&#8221;no&#8221;] <br><\/li>\n\n\n\n<li><strong>redirect_page_url<\/strong>: Forward\/redirect a single category page using this parameter. <br><br>Example:\u00a0[directorist_category redirect_page_url=&#8221;www.aazztech.com&#8221;] <br><\/li>\n\n\n\n<li><strong>listings_per_page<\/strong>: You can set the number of listing to show per page using this parameter. The default is 6. <br><br>Example:\u00a0[directorist_category listings_per_page=&#8221;6&#8243;] <br><\/li>\n\n\n\n<li><strong>header<\/strong>: You can show\/hide the header area using these attributes. Options available: yes | no. <br><br>Example:\u00a0[directorist_category header=&#8221;yes&#8221;] <br><\/li>\n\n\n\n<li><strong>header_title<\/strong>: You can customize the header title using this parameter.<br><br>Example\u00a0[directorist_category header_title=&#8221;Total Listing Found: &#8220;]<br><\/li>\n\n\n\n<li><strong>columns<\/strong>: You can set the number of columns of the grid view layout using this attribute. <br><br>Example\u00a0[directorist_category columns=&#8221;3&#8243;] <br><\/li>\n\n\n\n<li><strong>show_pagination<\/strong>: You can show\/hide pagination. Available Options: yes|no. <br><br>Example\u00a0[directorist_category show_pagination=&#8221;yes&#8221;] <br><\/li>\n\n\n\n<li><strong>map_height<\/strong>: You can customize the height of the map view layout using this attribute. <br><br>Example\u00a0[directorist_category\u00a0map_height=&#8221;350&#8243;] <\/li>\n<\/ol>\n\n\n\n<p><em>Bonus tips: Suppose your single category page URL is like this (<strong>https:\/\/yourwebsite.com\/single-category-page-url<\/strong>) and you have two categories BMW and Nissan. Then you can display\/view all listings under the BMW category by visiting\u00a0<strong>https:\/\/yourwebsite.com\/single-category-page-url\/bmw<\/strong>\u00a0and view\u00a0all listings\/cars by Nissan by visiting\u00a0<strong>https:\/\/yourwebsite.com\/single-category-page-url\/nissan.\u00a0<\/strong>Now you may have noticed how this single category page works dynamically. So basically it works like this. https:\/\/yourwebsite.com\/single-category-page-url\/{category_name}<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Single Category You can display all listings of a single category using the following shortcode. Remember, if you visit the page after adding this\u00a0[directorist_category]\u00a0shortcode\u00a0directly, you will see something like this \u2018No Results Found.\u2019 message. It is because the Directorist plugin will use the page with this shortcode to display all listings of a specific category [&hellip;]<\/p>\n","protected":false},"author":22343,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[707],"doc_tag":[],"class_list":["post-368470","docs","type-docs","status-publish","hentry","doc_category-shortcodes-library"],"year_month":"2026-03","word_count":478,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"Fairose Farabi","author_nicename":"farabisovware","author_url":"https:\/\/directorist.com\/author\/farabisovware\/"},"doc_category_info":[{"term_name":"Shortcodes Library","term_url":"https:\/\/directorist.com\/docs-category\/shortcodes-library\/"}],"doc_tag_info":[],"_links":{"self":[{"href":"https:\/\/directorist.com\/wp-json\/wp\/v2\/docs\/368470","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/directorist.com\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/directorist.com\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/directorist.com\/wp-json\/wp\/v2\/users\/22343"}],"replies":[{"embeddable":true,"href":"https:\/\/directorist.com\/wp-json\/wp\/v2\/comments?post=368470"}],"version-history":[{"count":0,"href":"https:\/\/directorist.com\/wp-json\/wp\/v2\/docs\/368470\/revisions"}],"wp:attachment":[{"href":"https:\/\/directorist.com\/wp-json\/wp\/v2\/media?parent=368470"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/directorist.com\/wp-json\/wp\/v2\/doc_category?post=368470"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/directorist.com\/wp-json\/wp\/v2\/doc_tag?post=368470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}