@@ -794,8 +794,19 @@ private function get_pages()
794794 }
795795 protected function render ()
796796
797- {
798- $ settings = $ this ->get_settings_for_display ();
797+ {
798+ $ settings = $ this ->get_settings_for_display ();
799+
800+ if (isset ($ _GET ['s ' ]) || is_archive ()){
801+ if ($ settings ['all_post ' ]!='all ' ){
802+ echo 'latest ' .$ settings ['posts_per_page ' ]."post " ;
803+ }
804+ else {
805+ echo 'latest post ' ;
806+ }
807+ }
808+ else {
809+
799810 if ($ settings ['posts_per_page ' ] == null ) {
800811 $ settings ['posts_per_page ' ] = 4 ;
801812 }
@@ -881,7 +892,7 @@ protected function render()
881892 echo '<div class="categories-links"> ' ;
882893 foreach ($ categories as $ category ) {
883894 $ category_link = add_query_arg ('category ' , $ category ->slug , $ page_link );
884- echo '<a href=" ' . $ category_link . '" class="category"> ' . $ category ->name . '</a> ' ;
895+ echo '<a href=" ' . $ category_link . '" class="category"> ' . $ category ->name . ' </a> ' ;
885896 }
886897 echo '</div> ' ;
887898 }
@@ -890,7 +901,7 @@ protected function render()
890901 if (!empty ($ categories )) {
891902 echo '<div class="categories-links"> ' ;
892903 foreach ($ categories as $ category ) {
893- echo '<a href=" ' . get_category_link ($ category ->term_id ) . '" class="category"> ' . $ category ->name . '</a> ' ;
904+ echo '<a href=" ' . get_category_link ($ category ->term_id ) . '" class="category"> ' . $ category ->name . ' </a> ' ;
894905 }
895906 echo '</div> ' ;
896907 }
@@ -913,7 +924,7 @@ protected function render()
913924 // If not, use the custom default image
914925 $ featured_image = $ settings ['default_image ' ]['url ' ];
915926 }
916- if (iElementor \Plugin:: $ instance -> editor -> is_edit_mode ()) {
927+ if (is_admin ()) {
917928 echo '<div class="card2" style="background-image: url( ' . $ featured_image . '); "> ' ;
918929 } else {
919930 echo ' <div class="card2" style="background-image: url( ' . $ featured_image . '); "onclick= \'window.location.href=" ' . $ post_link . '" \'> ' ;
@@ -929,7 +940,7 @@ protected function render()
929940 echo '<div class="categories-links"> ' ;
930941 foreach ($ categories as $ category ) {
931942 $ category_link = add_query_arg ('category ' , $ category ->slug , $ page_link );
932- echo '<a href=" ' . $ category_link . '" class="category"> ' . $ category ->name . '</a> ' ;
943+ echo '<a href=" ' . $ category_link . '" class="category"> ' . $ category ->name . ' </a> ' ;
933944 }
934945 echo '</div> ' ;
935946 }
@@ -938,7 +949,7 @@ protected function render()
938949 if (!empty ($ categories )) {
939950 echo '<div class="categories-links"> ' ;
940951 foreach ($ categories as $ category ) {
941- echo '<a href=" ' . get_category_link ($ category ->term_id ) . '" class="category"> ' . $ category ->name . '</a> ' ;
952+ echo '<a href=" ' . get_category_link ($ category ->term_id ) . '" class="category"> ' . $ category ->name . ' </a> ' ;
942953 }
943954 echo '</div> ' ;
944955 }
@@ -1118,4 +1129,5 @@ protected function render()
11181129
11191130 </style> ' ;
11201131 }
1132+ }
11211133}
0 commit comments