@@ -94,13 +94,15 @@ protected function render() {
9494 $ category_name = '' ;
9595 $ category_link = '' ;
9696 }
97- echo '<div class="card2"style="background-image: url( ' . $ featured_image . ');">
97+ echo '<div class="card2"style="background-image: url( ' . $ featured_image . ');">
9898 <div class="info">
99- <a href=" ' . $ category_link . '"> Categoria: ' . $ category_name . '</a>
10099 <a href=" ' . $ post_link . '" class="card2-link" style="display: block;">
101- <h1> ' . $ post_title . '</h1> <p class="post-date"> ' . $ post_date . '
102- </p> <p class="description"> ' . $ post_content .
103- '</p> </div> </div> ' ;
100+ <h1 class="title"> ' . $ post_title . '</h1><a class="date"> ' . $ post_date . '</a> ' ;
101+ if ($ category_name != '' ){
102+ echo '<p class="category"href=" ' . $ category_link . '"> Categoria: ' . $ category_name . '</p> ' ;
103+
104+ }
105+ echo '<p class="description"> ' . $ post_content .'</p></div> </div> </a> ' ;
104106 }
105107 wp_reset_postdata ();
106108 echo '</div> ' ;
@@ -129,11 +131,12 @@ protected function render() {
129131 echo '
130132 <div class="card2"style="background-image: url( ' . $ featured_image . ');">
131133 <a href=" ' . $ post_link . '" class="card2-link">
132- <div class="info"> <h1> ' . $ post_title . '</h1>
133- <a href=" ' . $ category_link . '"> Categoria: ' . $ category_name . '</a>
134- <a class="post-date"> ' . $ post_date . '
135- </a> <p class="description"> ' . $ post_content .
136- '</p></div> </div> </a> ' ;
134+ <div class="info"> <h1 class="title"> ' . $ post_title . '</h1><a class="date"> ' . $ post_date . '</a> ' ;
135+ if ($ category_name != '' ){
136+ echo '<p class="category"href=" ' . $ category_link . '"> Categoria: ' . $ category_name . '</p> ' ;
137+
138+ }
139+ echo '<p class="description"> ' . $ post_content .'</p></div> </div> </a> ' ;
137140 }
138141 wp_reset_postdata ();
139142 echo '</div> ' ;
@@ -172,6 +175,7 @@ protected function render() {
172175 translateY(-170px)
173176 translateZ(0); /* Regola la posizione verticale */
174177 transition: transform 0.5s ease-out;
178+
175179 }
176180
177181 .info:before {
@@ -197,26 +201,31 @@ protected function render() {
197201 }
198202
199203 .title {
200- margin: 0;
201204 font-size: 32px;
202- line-height: 1 ;
203- bottom: margin 0px;
205+ padding: 0 5px ;
206+ margin- bottom: 0px;
204207 color: rgba(0, 0, 0, 0.87);
205208 overflow-wrap: break-word;
206209 }
207210
208- .post-date {
209- margin: 0;
210- padding: 0 10px;
211+ .date {
212+ margin-top: 0;
213+ padding: 0 5px;
214+ font-size: 18px;
215+ color:black;
216+ }
217+ .category {
218+ margin-top: 0;
219+ margin-bottom: 0;
220+ padding: 0 5px;
211221 font-size: 18px;
212- color: rgba(0, 0, 0, 0.54) ;
222+ color:black ;
213223 }
214224
215225 .description {
216226 margin: 0;
217- padding: 0 24px 24px ;
227+ padding: 0 15px ;
218228 font-size: 19px;
219- line-height: 1.5;
220229 color: black !important;
221230 }
222231
0 commit comments