hangar-wp-theme/single.php

86 lines
3.0 KiB
PHP
Raw Normal View History

2021-02-18 14:09:56 +01:00
<?php get_header(); ?>
<div id="main">
<div id="content" class="unic">
<?php wp_breadcrumb();?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class('shadow'); ?>>
<h2><?php the_title(); ?></h2>
<?php
// mirem si són blocs i mostres autor i data, però en el bloc d'hangar només data, no volen l'autor
if ( in_category( array('3', '4')) || post_is_in_descendant_category( array( '3', '4') ) ) : ?>
<p class="meta alignleft"><span><?php _e('By ','hangar') . the_author(); ?></span></p>
<p class="meta alignright"><span><?php _e('Posted on ','hangar') . the_time('d F Y'); ?></span></p>
<?php elseif ( in_category( array(30)) || post_is_in_descendant_category( array(30) ) ) : ?>
<p class="meta alignright"><span><?php _e('Posted on ','hangar') . the_time('d F Y'); ?></span></p>
<?php endif;
?>
<div class="clear"></div>
<?php the_content(); ?>
<div class="clear"></div>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'hangar' ), 'after' => '</div>' ) ); ?>
<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
<div id="author-info" class="clearfix">
<div id="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'ari_author_bio_avatar_size', 50 ) ); ?>
</div>
<div id="author-description">
<h2><?php printf( __( 'About <span>%s</span>', 'hangar' ), get_the_author() ); ?></h2>
<p><?php the_author_meta( 'description' ); ?></p>
</div>
</div><!-- end Author Info -->
<?php endif; ?>
<div class="peupost">
<?php if ( count( get_the_category() ) ) : ?>
<p class="peupostp alignleft"><?php printf( __( 'Categories: %2$s', 'hangar' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
|
<?php endif; ?>
<?php
$tags_list = get_the_tag_list( '', ', ' );
if ( $tags_list ):
?>
<?php printf( __( 'Tags: %2$s', 'hangar' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
</p>
<?php endif; ?>
<?php // comments_popup_link( __( 'Leave a comment', 'hangar' ), __( '1 comment', 'hangar' ), __( '% comments', 'hangar' ) ); ?>
<p><?php edit_post_link( __( 'Edit &rarr;', 'hangar' ), '| ', '' ); ?></p>
</div>
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
</div>
<!--end Post-->
<div id="navegacio">
<p class="previous"><?php previous_post_link( '%link', '' . _x( '&larr; Previous Post', 'Previous post link', 'hangar' ) . '' ); ?></p>
<p class="next"><?php next_post_link( '%link', __('') . _x( 'Next Post &rarr;', 'Next post link', 'hangar' ) . '' ); ?></p>
</div>
</div>
<!--end Content-->
<?php //get_sidebar('secondary'); ?>
</div>
<!--end Main-->
<?php get_footer(); ?>