Trying to split the review section of my Product Description into 2 columns. It is nested just below the Product Description. The actual reviews in one column and the Add Review form in another column along side it.
Site is Wordpress with Woocommerce. To date I have moved the Reviews out of the Tabs and just below the Product Description. Look here https://www.boatpartsforless.com/shop/marpac-fuelwater-separator-filter-7-0860/. So that the page is not so long and I feel looks better in the Reviews I would like to display as mentioned above in Columns.
I came across the code for creating columns php
<?php
function my_multi_col($content) {
$columns = explode('<h2>', $content);
$i = 0;
foreach ($columns as $column) {
if (($i % 2) == 0) {
$return .= '<div class="content_left">'."
";
if ($i > 1) {
$return .= "<h2>";
} else {
$return .= '<div class="content_right">'."
<h2>";
}
$return .= $column;
$return .= '</p></div>';
$i++;
}
if(isset($columns[1])) {
$content = wpautop($return);
} else {
$content = wpautop($content);
}
echo $content;
}
}
add_filter('the_content', 'my_multi_col');
?>
I believe adding it to the single-product-reviews.php file will do the trick, just can't figure out what to replace the h2's with.
Or, a way that makes sense if I am completely off base here.
Any push in the right direction will be much appreciated.