• I had a list of 23 Team Members, all rows had 3 members except the last row had 2.
    I noticed the plugin would not close up all the divs properly on an incomplete row, and in my case, this wrecked the page lay out.
    I made a few simple changes to the shortcodes.php file and it fixed the issue.
    I generated a patch file that reflects my changes.
    While i was there i cleaned up the header tags in the bottom of the file. Hopefully you can roll these fixes into the next release.
    Thanks for a nice plug in.

    --- shortcodesoriginal.php      2014-05-13 23:47:55.000000000 -0400
    +++ shortcodes.php      2015-01-30 13:48:21.914725169 -0500
    @@ -128,6 +128,7 @@
                                                    class='mmt_container ".$this->parent_container_class."' id='".$this->parent_container_id."'>";
    
                            $team_members = array();
    +                       $counter=0; // pab fix
                            foreach( $team_members_list as $index=>$member ){
    
                                    if( $index%( $this->cols ) == 0 ){
    @@ -145,8 +146,9 @@
    
                                    $mmt .= $this->build_single_member( $member_details );
    +                               $counter++; // pab fix
    
    -                               if( $index%( $this->cols ) == ($this->cols-1) ){
    +                               if( $index%( $this->cols ) == ($this->cols-1) or $counter == count($team_members_list) ){ // pab fix
                                            $mmt .= '</div><!-- '.$this->row_container_class.' -->';
                                    }
    
    @@ -216,8 +218,8 @@
                            if( $this->display_picture == 'true' ){
                                    $display .= '<div class="mmt_member_img"><img src="'.$details['bio_picture'].'" alt="'.$details['name'].'" ></div>';
                            }
    -                       $display .= '<h4>'.$details['name'].'</h3>';
    -                       $display .= '<h6>'.$details['designation'].'</h4>';
    +                       $display .= '<h4>'.$details['name'].'</h4>'; // pab fix
    +                       $display .= '<h6>'.$details['designation'].'</h6>'; // pab fix
                    $display .= '</'.$this->item_container.'>';                                                                                                                                                                                                                    
    
                    return $modal.$display;

    https://www.ads-software.com/plugins/meet-my-team/

  • The topic ‘Partial last row breaks layout’ is closed to new replies.