Skip to content

Commit 57e8a69

Browse files
committed
Update Latest-Posts-Hover.php
1 parent 2d78fc6 commit 57e8a69

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

widgets/Latest-Posts-Hover.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected function _register_controls()
6868
[
6969
'label' => esc_html__('Background color', 'Latest-Posts-Hover'),
7070
'type' => \Elementor\Controls_Manager::COLOR,
71-
'default' => '255, 255, 255',
71+
'default' => '#FFFFFF',
7272
]
7373
);
7474
$this->add_control(
@@ -418,7 +418,8 @@ protected function render()
418418
$cardColor = $settings['card_color'];
419419
$wordPc = $settings['content_word_pc'];
420420
$wordMobile = $settings['content_word_mobile'];
421-
$flex = 100 / $settings['posts_per_page'];
421+
$flex = 100 / count($posts);
422+
422423
if ($settings['posts_per_page'] > 4) {
423424
$flex = 25;
424425
}

0 commit comments

Comments
 (0)