Directory Listing
Directory listing is done in therapists page.
Here we are using therapist and visual Portfolio Plugins.
(a)Therapist
- It is a Custom Script.
- Here we can add the therapist and category.
Step 1 : Below 3 function should be added in function.php file. Then the therapist option will show in Admin Dashboard.
function therapist_custom_init() {
$labels = array(
‘name’ => ‘therapist’,
‘singular_name’ => ‘therapist’,
‘add_new’ => ‘Add New’,
‘add_new_item’ => ‘Add New therapist’,
‘edit_item’ => ‘Edit therapist’,
‘new_item’ => ‘New therapist’,
‘all_items’ => ‘All therapist’,
‘view_item’ => ‘View therapist’,
‘search_items’ => ‘Search therapist’,
‘not_found’ => ‘No property found’,
‘not_found_in_trash’ => ‘No property found in Trash’,
‘parent_item_colon’ => ”,
‘menu_name’ => ‘therapist’
);
$args = array(
‘labels’ => $labels,
‘public’ => true,
‘publicly_queryable’ => true,
‘show_ui’ => true,
‘show_in_menu’ => true,
‘query_var’ => true,
‘rewrite’ => array( ‘slug’ => ‘therapist’ ),
‘capability_type’ => ‘post’,
‘has_archive’ => true,
‘hierarchical’ => false,
‘menu_position’ => null,
‘supports’ => array( ‘title’, ‘thumbnail’,’editor’,’excerpt’)
);
register_post_type( ‘therapist’, $args );
}
add_action( ‘init’, ‘therapist_custom_init’ );
function tr_create_my_taxonomy() {
register_taxonomy(
‘therapist-category’,
‘therapist’,
array(
‘label’ => __( ‘Category’ ),
‘rewrite’ => array( ‘slug’ => ‘therapist-category’ ),
‘hierarchical’ => true,
)
);
}
add_action( ‘init’, ‘tr_create_my_taxonomy’ );
function member_add_meta_box() {
add_meta_box(‘wporg_box_id’,
‘Tool Trip Title’, // Box title
‘wporg_custom_box_html’, // Content callback, must be of type callable
‘therapist’ // Post type
);
}
- Admin Dashboard select Therapist and click on Add New.
- Add Title, Description, select category & add featured image then publish.
(b)Portfolio Plugin
- It is a wordpress plugin u can download it from here.
- This plugin is using for creating layouts.
Step 1 : Add new Layout
Admin Dashboard select Visual Portfolio and click on Portfolio Layout & Add New.
Step 2 :
- Select Content source as a Post-based.
- Select Data Source as a Therapist.
- Select Order by date.
- Enable avoid duplicate posts.
- If required add custom CSS.
- Select Layout Grid.
- Place the shortcode where you want to show the portfolio list.