Shortcodes
Post Your Need comes with a couple of shortcodes for displaying the listings. They have a number of parameters to customize the output. All of these parameters are optional. If you do not use any parameters in the shortcode then the default settings ( Directory Listings > Directory Settings > Extensions Settings > Need Listing page ) will be applied. Let’s have a look at the available shortcodes and their parameters with some description: .
All Needs :
This shortcode displays all need listings.
Need Categories :
This shortcode displays all categories of need listings.
Need Locations :
This shortcode displays all locations of need listings.
All Needs : [directorist_all_needs]
This shortcode displays all need listings.
Parameters:
- orderby : You can order all needs using this parameter. Options available : title, date & price. Default is date. Example: [directorist_all_needs orderby=”date”].
- posts_per_page: You can set the number of needs to show per page using this parameter. Default is 6. Example: [directorist_all_needs posts_per_page=”6″].
- columns: You can set the number of columns of the grid view layout using this attribute. Example [directorist_all_needs columns=”3″].
- show_pagination: You can show/hide pagination. Available options: yes|no. Example [directorist_all_needs show_pagination=”yes”].
- display_budget: You can show/hide budget field. Available options: yes|no. Example [directorist_all_needs display_budget=”yes”].
- display_category: You can show/hide category field. Available options: yes|no. Example [directorist_all_needs display_category=”yes”].
- display_author: You can show/hide author field. Available options: yes|no. Example [directorist_all_needs display_author=”yes”].
Need Categories : [directorist_need_categories]
This shortcode displays all categories of need listings.
Parameters:
- view: You can display all categories in a list layout or grid layout. Available Options: list | grid view. The default value is grid. Example: [directorist_all_categories view=”grid”].
- orderby: You can order all categories using this attribute. Available Options : id | count | name | slug. The default is id. Example: [directorist_all_categories orderby =”id”] .
- order: You can sort all categories in ascending or descending order using this attribute. Available Options: asc | desc. Default is asc. Example: [directorist_all_categories order=”asc”].
- logged_in_user_only: You can make all categories page only visible for logged in user using this parameter. Options available: yes | no. Example: [directorist_all_categories logged_in_user_only=”no”].
- redirect_page_url: Forward/redirect all categories page using this parameter. Example: [directorist_all_categories redirect_page_url=”www.aazztech.com”].
- columns: You can set the number of columns of the grid view layout using this attribute. Example [directorist_all_categories columns=”3″]
- cat_per_page: You can set the number of categories to show per page using this parameter. Default is 100. Example: [directorist_all_categories cat_per_page=”6″].
- slug: You can display specific categories using this parameter. Use category slugs separated by a comma. Example: [directorist_all_categories slug=”food”].
Need Locations : [directorist_need_locations]
This shortcode displays all locations of need listings.
Parameters:
- view: You can display all locations in a list layout or grid layout. Available Options: list | grid view. The default value is grid. Example: [directorist_all_locations view=”grid”].
- orderby: You can order all locations using this attribute. Available Options : id | count | name | slug. The default is id. Example: [directorist_all_locations orderby =”id”] .
- order: You can sort all locations in ascending or descending order using this attribute. Available Options: asc | desc. Default is asc. Example: [directorist_all_locations order=”asc”].
- logged_in_user_only: You can make all locations page only visible for logged in user using this parameter. Options available: yes | no. Example: [directorist_all_locations logged_in_user_only=”no”].
- redirect_page_url: Forward/redirect all locations page using this parameter. Example: [directorist_all_locations redirect_page_url=”www.aazztech.com”].
- columns: You can set the number of columns of the grid view layout using this attribute. Example [directorist_all_locations columns=”3″]
- loc_per_page: You can set the number of locations to show per page using this parameter. Default is 100. Example: [directorist_all_locations loc_per_page=”6″].
- slug: You can be displayed any locations by this attribute. Example: [directorist_all_categories slug=”usa”].
Last Updated: August 30th, 2020