Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.22 KB | None | 0 0
  1. <div class="hl__hwd">
  2. <?php global $do_not_duplicate; global $post; $recent = new WP_Query(array( 'tag' => get_option('terkini'), 'posts_per_page' => '1' )); while($recent->have_posts()) : $recent->the_post(); $do_not_duplicate[] = $post->ID; if (isset($do_not_duplicate)) { ?>
  3. <div class="hl__item hl__item--big" style="width: 100%; float: left; margin-right: 0; position: relative; display: none;list-style:none;padding:15px">
  4. <a href="<?php the_permalink(); ?>" rel="bookmark" class="hl__link">
  5. <div class="hl__category">
  6. <span class="hl__link">Headline</span>
  7. </div>
  8. <?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { ?>
  9. <?php the_post_thumbnail('hwd-medium-thumb'); ?>
  10. <?php } ?>
  11. <div class="hl__gradient">
  12. <span class="feat-cat">
  13. <?php $category = get_the_category(); echo esc_html( $category[0]->cat_name ); ?>
  14. </span>
  15. <div class="hl__title">
  16. <h2><?php the_title(); ?></h2>
  17. </div>
  18. </div>
  19. </a>
  20. </div>
  21. <?php } endwhile; wp_reset_postdata(); ?>
  22. </div>
  23.  
  24. <?php if ( have_posts() ) : ?>
  25. <?php /* Start the Loop */ ?>
  26. <?php while ( have_posts() ) : the_post(); ?>
  27. <?php get_template_part( 'content', get_post_format() ); ?>
  28. <?php endwhile; ?>
  29. <?php else: ?>
  30. .......
  31.  
  32. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  33. <?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
  34. <div class="featured-post">
  35. <?php _e( 'Featured post', 'twentytwelve' ); ?>
  36. </div>
  37. <?php endif; ?>
  38.  
  39. <header class="entry-header">
  40. <?php if ( is_single() ) : ?>
  41. <?php custom_breadcrumbs(); ?>
  42. <h2 class="entry-title"><?php the_title(); ?></h2>
  43. <div class="date-post"><?php the_time(get_option('date_format')); ?></div>
  44. <?php if ( ! post_password_required() && ! is_attachment() ) :
  45. the_post_thumbnail('hwd-post-thumb');
  46. ?>
  47. <div class="entry-content">
  48. <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?>
  49. <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
  50. </div><!-- .entry-content -->
  51. <?php endif; // is_single() ?>
  52. </header><!-- .entry-header -->
  53. <?php else : ?>
  54. <li class="latest__item">
  55. <a href="<?php the_permalink(); ?>" rel="bookmark">
  56. <div class="latest__img">
  57. <?php the_post_thumbnail('hwd-mobile-thumb'); ?>
  58. </div>
  59. <div class="latest__title">
  60. <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
  61. </div>
  62. <?php twentytwelve_entry_meta() ?>
  63. </a>
  64. </li>
  65. <?php endif; ?>
  66.  
  67. <?php if ( is_search() ) : // Only display Excerpts for Search ?>
  68.  
  69. <?php endif; ?>
  70. </article><!-- #post -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement