@@ -11,7 +11,6 @@ public function get_name()
1111 {
1212 return 'latest-posts-hover ' ;
1313 }
14-
1514 public function get_title ()
1615 {
1716 return esc_html__ ('Latest Posts Hover ' , 'latest-posts-hover ' );
@@ -26,6 +25,7 @@ public function get_categories()
2625 {
2726 return ['OpenWidget ' ];
2827 }
28+
2929 protected function _register_controls ()
3030 {
3131 $ this ->start_controls_section (
@@ -98,6 +98,7 @@ protected function _register_controls()
9898 );
9999
100100 $ this ->end_controls_section ();
101+
101102 $ this ->start_controls_section (
102103 'section_title ' ,
103104 [
@@ -790,6 +791,7 @@ private function get_pages()
790791 }
791792 return $ options ;
792793 }
794+
793795 protected function render ()
794796
795797 {
@@ -816,11 +818,6 @@ protected function render()
816818 $ args = [
817819 'posts_per_page ' => -1 ,
818820 ];
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
824821 }
825822
826823 $ posts = get_posts ($ args );
@@ -883,7 +880,7 @@ protected function render()
883880 echo '<div class="categories-links"> ' ;
884881 foreach ($ categories as $ category ) {
885882 $ category_link = add_query_arg ('category ' , $ category ->slug , $ page_link );
886- echo '<a href=" ' . $ category_link . '" class="category"> ' . $ category ->name . '</a> ' ;
883+ echo '<a href=" ' . $ category_link . '" class="category"> ' . $ category ->name . ' </a> ' ;
887884 }
888885 echo '</div> ' ;
889886 }
@@ -892,7 +889,7 @@ protected function render()
892889 if (!empty ($ categories )) {
893890 echo '<div class="categories-links"> ' ;
894891 foreach ($ categories as $ category ) {
895- echo '<a href=" ' . get_category_link ($ category ->term_id ) . '" class="category"> ' . $ category ->name . '</a> ' ;
892+ echo '<a href=" ' . get_category_link ($ category ->term_id ) . '" class="category"> ' . $ category ->name . ' </a> ' ;
896893 }
897894 echo '</div> ' ;
898895 }
@@ -931,7 +928,7 @@ protected function render()
931928 echo '<div class="categories-links"> ' ;
932929 foreach ($ categories as $ category ) {
933930 $ category_link = add_query_arg ('category ' , $ category ->slug , $ page_link );
934- echo '<a href=" ' . $ category_link . '" class="category"> ' . $ category ->name . '</a> ' ;
931+ echo '<a href=" ' . $ category_link . '" class="category"> ' . $ category ->name . '<br>; </a> ' ;
935932 }
936933 echo '</div> ' ;
937934 }
@@ -940,7 +937,7 @@ protected function render()
940937 if (!empty ($ categories )) {
941938 echo '<div class="categories-links"> ' ;
942939 foreach ($ categories as $ category ) {
943- echo '<a href=" ' . get_category_link ($ category ->term_id ) . '" class="category"> ' . $ category ->name . '</a> ' ;
940+ echo '<a href=" ' . get_category_link ($ category ->term_id ) . '" class="category"> ' . $ category ->name . ' </a> ' ;
944941 }
945942 echo '</div> ' ;
946943 }
@@ -1071,7 +1068,6 @@ protected function render()
10711068 .category {
10721069 margin-top: 0px;
10731070 margin-bottom: 0px;
1074- padding: 0 5px;
10751071 font-size: 18px;
10761072 color:black;
10771073 display:none;
0 commit comments