Advertisement
Guest User

Untitled

a guest
Sep 21st, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1. <br/>
  2. <div align="center">
  3. <form class="form-wrapper" action="/" method="get">
  4. <input type="text" name="s" id="search" value="<?php the_search_query(); ?>" placeholder="Search for..." required>
  5. <input type="submit" value="go" id="submit">
  6. </form>
  7. </div>
  8. <br/>
  9.  
  10. <?php if( is_front_page() && is_home() ) { ?>
  11.  
  12. <div class="gl-title"><font color="#DD3333">&#9889;</font> Trending Now...</div>
  13.  
  14.  
  15.  
  16. <?php
  17.  
  18. $args = array(
  19. 'posts_per_page' => 8,
  20. 'post__in' => get_option( 'sticky_posts' ),
  21. 'ignore_sticky_posts' => 1
  22. );
  23. $my_query = new WP_Query( $args );
  24.  
  25. $do_not_duplicate = array();
  26. while ( $my_query->have_posts() ) : $my_query->the_post();
  27. $do_not_duplicate[] = $post->ID; ?>
  28.  
  29.  
  30.  
  31. <!--Pattern HTML-->
  32. <div id="pattern" class="pattern">
  33. <ul class="list img-list">
  34.  
  35. <li>
  36. <a href="<?php the_permalink(); ?>" class="inner">
  37. <div class="li-img">
  38. <?php the_post_thumbnail(); ?>
  39. </div>
  40. <div class="li-text">
  41. <h4 class="li-head"><?php the_title(); ?></h4>
  42.  
  43. </div>
  44. </a>
  45. </li>
  46.  
  47.  
  48. </ul>
  49. </div>
  50. <!--End Pattern HTML-->
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. <?php endwhile; ?>
  59. <?php wp_reset_postdata(); //VERY VERY IMPORTANT?>
  60.  
  61.  
  62.  
  63.  
  64.  
  65. <br/>
  66. <br/>
  67.  
  68. <div class="gl-title"><font color="#DD3333">&#9835;</font> Fresh Songs</div>
  69.  
  70. <?php
  71. // the query
  72. $the_query = new WP_Query( array(
  73. 'category_name' => 'news',
  74. 'posts_per_page' => 5,
  75. ));
  76. ?>
  77.  
  78. <?php if ( $the_query->have_posts() ) : ?>
  79. <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
  80.  
  81. <!--Pattern HTML-->
  82. <div id="pattern" class="pattern">
  83. <ul class="list img-list">
  84.  
  85. <li>
  86. <a href="<?php the_permalink(); ?>" class="inner">
  87. <div class="li-img">
  88. <?php the_post_thumbnail(); ?>
  89. </div>
  90. <div class="li-text">
  91. <h4 class="li-head"><?php the_title(); ?></h4>
  92.  
  93. </div>
  94. </a>
  95. </li>
  96.  
  97.  
  98. </ul>
  99. </div>
  100. <!--End Pattern HTML-->
  101.  
  102.  
  103. <?php endwhile; ?>
  104. <?php wp_reset_postdata(); ?>
  105.  
  106.  
  107.  
  108.  
  109.  
  110. <?php else : ?>
  111.  
  112.  
  113.  
  114.  
  115. <p><?php __('No News'); ?></p>
  116. <?php endif; ?>
  117. <div style="width: 91%; padding: 10px; margin: 8px; border: 1px solid #d1d1d1; background: #fff;" align="right">
  118. <a href="/category/news" class="gl-more-songs"><font color="#fff">Load more songs...</font></a>
  119. </div>
  120. <br/>
  121. <div class="gl-title"><font color="#DD3333">&#9832;</font> Latest Updates</div>
  122. <?php } else { ?>
  123.  
  124.  
  125.  
  126.  
  127.  
  128. <?php if ( is_archive() ) { ?>
  129. <h2 class="heading-font archive-title"><?php wptouch_fdn_archive_title_text(); ?></h2>
  130. <?php } ?>
  131.  
  132. <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement