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
);
}

Step 2 : Add new Therapist.
  • Admin Dashboard select Therapist and click on Add New.
  • Add Title, Description, select category & add featured image then publish.
(b)Portfolio Plugin
Here, We are using this plugin for showcase the therapist list with Proper layout in front end.
  • 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 :

  1. Select Content source as a Post-based.
  2. Select Data Source as a Therapist.
  3. Select Order by date.
  4. Enable avoid duplicate posts.
  5. If required add custom CSS.
  6. Select Layout Grid.
  7. Place the shortcode where you want to show the portfolio list.
Video Tutorial