Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. <?php
  2. /**
  3. * The template part for displaying single posts
  4. *
  5. * @package FlyMag
  6. */
  7. ?>
  8.  
  9. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  10.  
  11. <?php if ( has_post_thumbnail() ) : ?>
  12. <div class="single-thumb">
  13. <?php the_post_thumbnail( 'entry-thumb' ); ?>
  14. </div>
  15. <?php endif; ?>
  16.  
  17. <header class="entry-header">
  18. <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
  19.  
  20.  
  21. <?php if ( get_theme_mod( 'flymag_single_date' ) != 1 ) : ?>
  22. <div class="entry-meta">
  23. <?php flymag_posted_on(); ?>
  24. </div><!-- .entry-meta -->
  25. <?php endif; ?>
  26. </header><!-- .entry-header -->
  27.  
  28.  
  29. <?php // Get terms for post
  30. $terms = get_the_terms( $post->ID , 'rubrika' );
  31. // Loop over each item since it's an array
  32. if ( $terms != null ){
  33. foreach( $terms as $term ) {
  34. $term_link = get_term_link( $term, 'rubrika' );
  35. // Print the name and URL
  36. echo '<a href="' . $term_link . '">' . $term->name . '</a>';
  37. // Get rid of the other data stored in the object, since it's not needed
  38. unset($term); } } ?>
  39.  
  40.  
  41.  
  42. <div class="entry-content">
  43. <?php the_content(); ?>
  44. <?php
  45. wp_link_pages( array(
  46. 'before' => '<div class="page-links">' . __( 'Pages:', 'flymag' ),
  47. 'after' => '</div>',
  48. ) );
  49.  
  50.  
  51. ?>
  52. </div><!-- .entry-content -->
  53.  
  54. <footer class="entry-footer">
  55.  
  56.  
  57. <?php flymag_entry_footer(); ?>
  58. </footer><!-- .entry-footer -->
  59. </article><!-- #post-## -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement