{"id":4934325,"date":"2014-05-20T16:00:07","date_gmt":"2014-05-20T16:00:07","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/end-row-doesnt-account-for-unfull-rows\/"},"modified":"2016-08-21T20:46:17","modified_gmt":"2016-08-21T20:46:17","slug":"end-row-doesnt-account-for-unfull-rows","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/end-row-doesnt-account-for-unfull-rows\/","title":{"rendered":"End Row doesn&#039;t account for unfull rows"},"content":{"rendered":"<p>Hello,<br \/>\nWanted to inform you of an issue with your plugin, when using the shortcode ([meet-my-team]) the content following falls up into the html rendered by the shortcode. I found this was due to the end row logic in the plugin which doesn&#8217;t take into account unfilled rows.<br \/>\nFor instance if you have 10 items with 3 per row the last row has 1 item but because this is less than the items per row the ending div isn&#8217;t added leaving the rendered html unclosed.<\/p>\n<p>I&#8217;ve corrected this for my client but wanted to inform you so my changes aren&#8217;t lost on the next update.<\/p>\n<p>I updated meet-my-team\/public\/shortcodes.php doing a check if we&#8217;re on the last item in which case we add the end div.<\/p>\n<p>Previous Code:<\/p>\n<pre><code>if( $index%( $this-&gt;cols ) == ($this-&gt;cols-1) || $index == count($team_members_list)-1 ){\n\t$mmt .= &#039;&lt;\/div&gt;&lt;!-- &#039;.$this-&gt;row_container_class.&#039; --&gt;&#039;;\n}<\/code><\/pre>\n<p>Corrected Code:<\/p>\n<pre><code>if( $index%( $this-&gt;cols ) == ($this-&gt;cols-1) || $index == count($team_members_list)-1 ){\n\t$mmt .= &#039;&lt;\/div&gt;&lt;!-- &#039;.$this-&gt;row_container_class.&#039; --&gt;&#039;;\n}<\/code><\/pre>\n<p>Hope you can fix this for the next update,<br \/>\nThanks<\/p>\n<p>https:\/\/wordpress.org\/plugins\/meet-my-team\/<\/p>\n","protected":false},"template":"","class_list":["post-4934325","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4934325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4934325\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=4934325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}