Here is a guide how to change display of team members in Rows and Columns instead of default display of Slider:
1. Login to WordPress Dashboard: Enter your WordPress admin credentials to log into your Dashboard.
2. Navigate to Theme Editor: From the left-hand side menu, hover over “Appearance” and click on “Theme Editor”.
3. Find the PHP File: In the list of theme files on the right side of the screen, find and click on tishclinic/inc/blocks.php to load it in the editor.
4. Locate the Function: Use the editor’s search functionality (usually CTRL + F or CMD + F on Mac) to find the function tishonator_team_members_block_render_callback.
function tishonator_team_members_block_render_callback( $attributes, $content ) {
$result = '';
$count = array_key_exists( "countValue", $attributes ) ? $attributes["countValue"] : 8;
$teammembersArgs = array( 'post_type' => 'teammember', 'posts_per_page' => $count);
$r = new WP_Query( $teammembersArgs );
if ( $r->have_posts() ) {
$result .= '<section class="doctors-slider-section"><div class="wrd-team-one-wrapper"><div class="container"><div id="wrd-doctors-one-slider" class="row">';
while ( $r->have_posts() ) : $r->the_post();
$data = get_post_meta( $r->post->ID, 'teammember', true );
$result .= '<div class="col-lg-12">';
$result .= '<div class="wrd-single-team-member">';
$result .= '<div class="member-image-wrapper">';
$result .= '<a class="wrd-member-details-url" href="' . esc_url( get_permalink() ) . '">';
$result .= '<div class="member-image">';
$result .= '<img src="' . get_the_post_thumbnail_url(get_the_id(), 'full')
. '" alt="' . get_the_title() . '">';
$result .= '</div>';
$result .= '</a>';
$result .= '</div>';
$result .= '<div class="wrd-member-content">';
$result .= '<a href="' . esc_url( get_permalink() ) . '">';
$result .= '<h3 class="wrd-member-name">' . get_the_title() . '</h3>';
$result .= '</a>';
if ( !empty($data['position']) ) {
$result .= '<span class="wrd-member-designation wrd-secondary-font">' . $data['position'] . '</span>';
}
$result .= '</div>';
$result .= '</div>';
$result .= '</div>';
endwhile;
$result .= '</div></div></div></section>';
}
return $result;
}
5. Make Changes: Replace the current function with the new modified function provided below. Ensure that the changes are exactly as shown above.
function tishonator_team_members_block_render_callback( $attributes, $content ) {
$result = '';
$count = array_key_exists( "countValue", $attributes ) ? $attributes["countValue"] : 8;
$teammembersArgs = array( 'post_type' => 'teammember', 'posts_per_page' => $count);
$r = new WP_Query( $teammembersArgs );
if ( $r->have_posts() ) {
$result .= '<section class="doctors-section"><div class="wrd-team-one-wrapper"><div class="container"><div id="wrd-doctors-one" class="row">';
while ( $r->have_posts() ) : $r->the_post();
$data = get_post_meta( $r->post->ID, 'teammember', true );
$result .= '<div class="col-lg-4">';
$result .= '<div class="wrd-single-team-member">';
$result .= '<div class="member-image-wrapper">';
$result .= '<a class="wrd-member-details-url" href="' . esc_url( get_permalink() ) . '">';
$result .= '<div class="member-image">';
$result .= '<img src="' . get_the_post_thumbnail_url(get_the_id(), 'full')
. '" alt="' . get_the_title() . '">';
$result .= '</div>';
$result .= '</a>';
$result .= '</div>';
$result .= '<div class="wrd-member-content">';
$result .= '<a href="' . esc_url( get_permalink() ) . '">';
$result .= '<h3 class="wrd-member-name">' . get_the_title() . '</h3>';
$result .= '</a>';
if ( !empty($data['position']) ) {
$result .= '<span class="wrd-member-designation wrd-secondary-font">' . $data['position'] . '</span>';
}
$result .= '</div>';
$result .= '</div>';
$result .= '</div>';
endwhile;
$result .= '</div></div></div></section>';
}
return $result;
}
6. Save Changes: Click on the “Update File” button at the bottom of the page to save your changes.