cleaned up the_excerpt and short content. tagged properly the header sections
This commit is contained in:
parent
a63aa3d923
commit
c0dab68f92
19
caixes.php
19
caixes.php
|
@ -2,14 +2,17 @@
|
||||||
<!-- les pàgines fixes (no categories ni artistes) -->
|
<!-- les pàgines fixes (no categories ni artistes) -->
|
||||||
<?php if ((!$category) and ($tipus == 'pag')) : ?>
|
<?php if ((!$category) and ($tipus == 'pag')) : ?>
|
||||||
<article class="not-category tipus-pag">
|
<article class="not-category tipus-pag">
|
||||||
<h2 class="box <?php echo $tipus;?>">
|
<div class="head-entry">
|
||||||
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title() ;?> </a>
|
<h2 class="box <?php echo $tipus;?>">
|
||||||
</h2>
|
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title() ;?> </a>
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
<div class="contingut plus">
|
<div class="contingut plus">
|
||||||
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
|
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
|
||||||
<?php the_post_thumbnail('thumbnail'); ?>
|
<?php the_post_thumbnail('thumbnail'); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php the_excerpt(); ?>
|
<?php //the_excerpt(); ?>
|
||||||
|
<?php echo hangar_trim_excerpt(); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="boxpeu" >
|
<div class="boxpeu" >
|
||||||
<a href="<?php the_permalink(); ?>" class="peubox" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><img alt="enllaç" src="<?php echo get_template_directory_uri() . '/images/fletxalink.png';?>" /></a>
|
<a href="<?php the_permalink(); ?>" class="peubox" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><img alt="enllaç" src="<?php echo get_template_directory_uri() . '/images/fletxalink.png';?>" /></a>
|
||||||
|
@ -47,7 +50,6 @@
|
||||||
<div class="contingut">
|
<div class="contingut">
|
||||||
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
|
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
|
||||||
<?php the_post_thumbnail('artists-thumb'); ?>
|
<?php the_post_thumbnail('artists-thumb'); ?>
|
||||||
<?php //the_post_thumbnail('thumbnail'); ?>
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
|
@ -57,11 +59,11 @@
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="boxpeu" >
|
<div class="boxpeu" >
|
||||||
<!-- la fletxeta link al post/pàgina -->
|
<?php // la fletxeta link al post/pàgina ?>
|
||||||
<a href="<?php the_permalink(); ?>" class="peubox" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><img alt="enllaç" src="<?php echo get_template_directory_uri() . '/images/fletxalink.png';?>" /></a>
|
<a href="<?php the_permalink(); ?>" class="peubox" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><img alt="enllaç" src="<?php echo get_template_directory_uri() . '/images/fletxalink.png';?>" /></a>
|
||||||
|
|
||||||
<?php if (is_home()) : ?>
|
<?php if (is_home()) : ?>
|
||||||
<!-- els quadrets link a la categoria pare -->
|
<?php // els quadrets link a la categoria pare ?>
|
||||||
<a href="<?php echo get_permalink(2); ?>" class="peudret" title="<?php echo get_the_title(2); ?>" rel="bookmark"><img alt="enllaç a la categoria" src="<?php echo get_template_directory_uri() . '/images/totslink.png';?>" /></a>
|
<a href="<?php echo get_permalink(2); ?>" class="peudret" title="<?php echo get_the_title(2); ?>" rel="bookmark"><img alt="enllaç a la categoria" src="<?php echo get_template_directory_uri() . '/images/totslink.png';?>" /></a>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -93,7 +95,7 @@
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if (has_excerpt()) : ?>
|
<?php if (has_excerpt()) : ?>
|
||||||
<p class="excerptbox"><?php the_excerpt();//echo get_the_excerpt(); ?></p>
|
<p class="excerptbox"><?php the_excerpt();?></p>
|
||||||
<?php else :?>
|
<?php else :?>
|
||||||
<div class="contingut curt"><?php echo hangar_trim_excerpt(); ?></div>
|
<div class="contingut curt"><?php echo hangar_trim_excerpt(); ?></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -201,7 +203,6 @@
|
||||||
<div class="contingut">
|
<div class="contingut">
|
||||||
<p class="excerptbox">
|
<p class="excerptbox">
|
||||||
<?php
|
<?php
|
||||||
// echo get_the_excerpt();
|
|
||||||
// https://developer.wordpress.org/reference/functions/wp_trim_words/
|
// https://developer.wordpress.org/reference/functions/wp_trim_words/
|
||||||
echo wp_trim_words(get_the_excerpt(), 60,' <a href="'. get_permalink($post->ID) . '">[...]</a>')
|
echo wp_trim_words(get_the_excerpt(), 60,' <a href="'. get_permalink($post->ID) . '">[...]</a>')
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -23,7 +23,7 @@ get_header(); ?>
|
||||||
<h2 class="box index"><?php the_title(); ?></h2>
|
<h2 class="box index"><?php the_title(); ?></h2>
|
||||||
<?php if ( has_post_thumbnail() ) : // check if the post has a Post Thumbnail assigned to it.
|
<?php if ( has_post_thumbnail() ) : // check if the post has a Post Thumbnail assigned to it.
|
||||||
the_post_thumbnail('thumbnail'); ?>
|
the_post_thumbnail('thumbnail'); ?>
|
||||||
<p class="excerptbox"><?php echo get_the_excerpt(); ?></p>
|
<p class="excerptbox"><?php the_excerpt(); ?></p>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<div class="contentcurt">
|
<div class="contentcurt">
|
||||||
<?php the_content(); ?>
|
<?php the_content(); ?>
|
||||||
|
|
Loading…
Reference in New Issue