diff --git a/caixes.php b/caixes.php index 2754109..cb0acaa 100644 --- a/caixes.php +++ b/caixes.php @@ -5,78 +5,84 @@ -

- -
- -
-
- enllaç -
+
+

+ +

+
+ +
+
+ enllaç +
+
- -
- - - - -

- -

- -
- - ID, 'autor_tipo_resid', true) && get_post_meta($post->ID, 'autor_data_resid', true)): ?> -

- ID, 'autor_tipo_resid', true)) ?> -
- ID, 'autor_data_resid', true)) ?> -

- -

- - -

ID, 'data_obra', true) ?>

- - -
- - - - -
- -
- imatge no disponible +
+
+ + + + +

+ +

+
- -
- - enllaç - - - - enllaç a la categoria + + ID, 'autor_tipo_resid', true) && get_post_meta($post->ID, 'autor_data_resid', true)): ?> +

+ ID, 'autor_tipo_resid', true)) ?> +
+ ID, 'autor_data_resid', true)) ?> +

+ +

+ + +

ID, 'data_obra', true) ?>

+ + + + +
+ imatge no disponible +
-
+
+ + enllaç + + + enllaç a la categoria + +
+
-ID, 'carrec', true); - elseif($lang == 'es'): - $carrec = get_post_meta($post->ID, 'carrecES', true); - elseif($lang == 'en'): - $carrec = get_post_meta($post->ID, 'carrecEN', true); - endif; - $email = get_post_meta($post->ID, 'email', true); - $telefon = get_post_meta($post->ID, 'telefon', true); - ?> + ID, 'carrec', true); + elseif($lang == 'es'): $carrec = get_post_meta($post->ID, 'carrecES', true); + elseif($lang == 'en'): $carrec = get_post_meta($post->ID, 'carrecEN', true); + endif; + $email = get_post_meta($post->ID, 'email', true); + $telefon = get_post_meta($post->ID, 'telefon', true); + ?> +

@@ -97,60 +103,66 @@
- - +
+ +
-
- - - - -

- -

- +
+ + + + +

+ +

+ +
-
-
- -
+
+ +
- -
- enllaç - - - enllaç a la categoria - -
+ +
+ enllaç + + + enllaç a la categoria + +
+ +
term_id;?> -
- - - name;?> - -

- - - +
+ +
+ + name;?> -

+

- -

- - -
- ID, 'data_activitat', true) )): + + + name;?> + +

+ + +

+ + +
+ + ID, 'data_activitat', true) )): ?>

- - - +

+ + + +
- -

- ID) . '">[...]') - ?> -

+ +
+

+ ID) . '">[...]') + ?> +

+
@@ -212,5 +227,5 @@
- + diff --git a/functions.php b/functions.php index a2ad727..bdb7a4f 100644 --- a/functions.php +++ b/functions.php @@ -53,14 +53,49 @@ add_filter('admin_footer_text', 'remove_footer_admin'); //per imprimir el content sense que ens tregui l'html +//https://www.wordpressaddicted.com/wordpress-get-content-with-formatting/ function get_the_content_with_formatting ($more_link_text = '(...)', $stripteaser = 0, $more_file = '') { $content = get_the_content($more_link_text, $stripteaser, $more_file); $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); + // output max 400 characters $content = substr($content, 0,400); return $content; } +// formatting the excertp +// https://wordpress.stackexchange.com/a/112651 +remove_filter('get_the_excerpt', 'wp_trim_excerpt'); +function hangar_html_excerpt($text) { + global $post; + if ( '' == $text ) { + $text = get_the_content(''); + $text = apply_filters('the_content', $text); + $text = str_replace('\]\]\>', ']]>', $text); + $text = strip_tags($text, '

'); //write tags allowed + $excerpt_length = 55; + $words = explode(' ', $text, $excerpt_length + 1); + if (count($words)> $excerpt_length) { + array_pop($words); + array_push($words, '[...]'); + $text = implode(' ', $words); + } + } + return $text; +} +add_filter('get_the_excerpt', 'hangar_html_excerpt'); +/** + * Filter the except length to 20 words. + * https://developer.wordpress.org/reference/functions/the_excerpt/#comment-325 + * @param int $length Excerpt length. + * @return int (Maybe) modified excerpt length. + */ +function hangar_custom_excerpt_length( $length ) { + return 10; +} +add_filter( 'excerpt_length', 'hangar_custom_excerpt_length', 999 ); + + //afegir estils a l'editor /* Custom CSS styles on WYSIWYG - Start diff --git a/style.css b/style.css index d071335..4e833c6 100644 --- a/style.css +++ b/style.css @@ -797,7 +797,7 @@ span.cat a{text-transform: uppercase; letter-spacing:normal} .boxentry .curt, .boxentry p.excerptbox {max-height: 5.6rem; height: auto/*60px*/; font-size:11.5px;} .boxentry .mig {height: 195px;} .boxentry .llarg {height: 225px;} -.boxentry .plus {height: 331px;} +.boxentry .plus {height:327px;/*height: 331px;*/} .boxentry .plus p{display:inline;} /* special setting for showing excerpt image */