Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The template part for displaying single posts
- *
- * @package FlyMag
- */
- ?>
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <?php if ( has_post_thumbnail() ) : ?>
- <div class="single-thumb">
- <?php the_post_thumbnail( 'entry-thumb' ); ?>
- </div>
- <?php endif; ?>
- <header class="entry-header">
- <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
- <?php if ( get_theme_mod( 'flymag_single_date' ) != 1 ) : ?>
- <div class="entry-meta">
- <?php flymag_posted_on(); ?>
- </div><!-- .entry-meta -->
- <?php endif; ?>
- </header><!-- .entry-header -->
- <?php // Get terms for post
- $terms = get_the_terms( $post->ID , 'rubrika' );
- // Loop over each item since it's an array
- if ( $terms != null ){
- foreach( $terms as $term ) {
- $term_link = get_term_link( $term, 'rubrika' );
- // Print the name and URL
- echo '<a href="' . $term_link . '">' . $term->name . '</a>';
- // Get rid of the other data stored in the object, since it's not needed
- unset($term); } } ?>
- <div class="entry-content">
- <?php the_content(); ?>
- <?php
- wp_link_pages( array(
- 'before' => '<div class="page-links">' . __( 'Pages:', 'flymag' ),
- 'after' => '</div>',
- ) );
- ?>
- </div><!-- .entry-content -->
- <footer class="entry-footer">
- <?php flymag_entry_footer(); ?>
- </footer><!-- .entry-footer -->
- </article><!-- #post-## -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement