Skip to content

Commit 306bebd

Browse files
committed
Update Latest-Posts-Hover.php
1 parent 30cbd04 commit 306bebd

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

widgets/Latest-Posts-Hover.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,9 +816,12 @@ protected function render()
816816
$args = [
817817
'posts_per_page' => -1,
818818
];
819-
$this->set_settings('selected_page', get_the_ID());
819+
echo '<script>
820+
const selectedPageControl = elementor.settings.page.controls.selected_page;
821+
822+
// Imposta il valore desiderato per il controllo
823+
selectedPageControl.setValue(' . get_the_ID() . '); </script>'; // Sostituisci 10 con l'ID pagina desiderato
820824
}
821-
echo get_the_ID();
822825

823826
$posts = get_posts($args);
824827
$cardColor = $settings['card_color'];

0 commit comments

Comments
 (0)