fixed up the marquee comment section for less then 3 comments

This commit is contained in:
2026-03-11 22:24:32 +01:00
parent 61d2425632
commit 678541f54c
3 changed files with 10 additions and 5 deletions

View File

@@ -9,7 +9,7 @@
* Plugin Name: PartnerExpo Core * Plugin Name: PartnerExpo Core
* Plugin URI: https://partnerexpo.eu * Plugin URI: https://partnerexpo.eu
* Description: A PartnerEXPO oldal belső pluginja * Description: A PartnerEXPO oldal belső pluginja
* Version: 1.1.4 * Version: 1.1.5
* Author: Juhász Levente * Author: Juhász Levente
* Author URI: https://github.com/Duskell/ * Author URI: https://github.com/Duskell/
* License: GPL-2.0+ * License: GPL-2.0+
@@ -23,7 +23,7 @@ if ( ! defined( 'WPINC' ) ) {
die; die;
} }
define( 'PARTNEREXPO_CORE_VERSION', '1.1.4' ); define( 'PARTNEREXPO_CORE_VERSION', '1.1.5' );
function activate_partnerexpo_core() { function activate_partnerexpo_core() {
require_once plugin_dir_path( __FILE__ ) . 'includes/class-partnerexpo-core-activator.php'; require_once plugin_dir_path( __FILE__ ) . 'includes/class-partnerexpo-core-activator.php';

View File

@@ -41,8 +41,8 @@
.pexpo-core-comment-group { .pexpo-core-comment-group {
display: flex; display: flex;
gap: 20px; gap: 100px;
padding-right: 20px; /* padding-right: 20px; */
} }
.pexpo-core-comment { .pexpo-core-comment {

View File

@@ -25,7 +25,12 @@
if ( ! empty( $comments ) ) { if ( ! empty( $comments ) ) {
echo '<div class="pexpo-core-comment-groups-wrapper">'; echo '<div class="pexpo-core-comment-groups-wrapper">';
for ($i = 0; $i < 2; $i++) { if ( count( $comments ) < 3 ) {
$groups = 6 / count( $comments );
} else {
$groups = 2;
}
for ($i = 0; $i < $groups; $i++) {
echo '<div class="pexpo-core-comment-group"'.($i ? ' aria-hidden="true"' : '').'>'; echo '<div class="pexpo-core-comment-group"'.($i ? ' aria-hidden="true"' : '').'>';
foreach ($comments as $comment) { foreach ($comments as $comment) {