Advertisement
Guest User

Untitled

a guest
Jul 1st, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.21 KB | None | 0 0
  1. <?php
  2. /**
  3. * The template for displaying main page with all posts
  4. *
  5. * @package BestWebLayout
  6. * @subpackage Restaurant Advisor
  7. * @since Restaurant Advisor 1.0
  8. **/
  9.  
  10. get_header(); ?>
  11. <div class="advisor-main">
  12.     <div class="advisor-posts">
  13.         <?php if ( have_posts() ) {
  14.             while ( have_posts() ) {
  15.                 the_post(); ?>
  16.                     <article <?php post_class( "advisor-the-post" ); ?> id="advisor-post_<?php the_ID(); ?>">
  17.                         <div class="advisor-post-title">
  18.                             <h1>
  19.                                 <?php if ( is_sticky() ) {
  20.                                     echo '<i class="fa fa-paperclip" style="display:none;"></i>';
  21.                                 } ?>
  22.                                 <a <?php do_action( 'advisor_link_for_title' ); ?> >
  23.                                 <?php if ( 'link' == get_post_format() ) {
  24.                                     echo '<i class="fa fa-external-link"></i>';
  25.                                 }
  26.                                 the_title(); ?> </a>
  27.                             </h1>
  28.                         </div><!-- .advisor-post-title -->
  29.                             <?php do_action( 'advisor_entry_meta', $post ); ?>
  30.                         <?php if ( has_post_thumbnail() ) { ?>
  31.                             <div class="advisor-thumbnail-wrap">
  32.                                 <div class='advisor-post-image'>
  33.                                     <a href="<?php the_permalink(); ?>">
  34.                                         <?php the_post_thumbnail(); ?>
  35.                                     </a>
  36.                                 <?php echo apply_filters( 'advisor_thumbnail_caption', '' ); ?>
  37.                                 </div>
  38.                             </div><!-- .advisor-thumbnail-wrap -->
  39.                         <?php } ?>
  40.                         <div class="advisor-content">
  41.                             <?php the_content(); ?>
  42.                         </div> <!-- .advisor-content -->
  43.                         <div class="advisor-clear"></div>
  44.                         <?php wp_link_pages(
  45.                             array(
  46.                                 'before'      => '<div class="advisor-page-links"><span class="advisor-page-links-title">' . __( 'Pages', 'restaurant-advisor' ) . ':' . '</span>',
  47.                                 'after'       => '</div>',
  48.                                 'link_before' => '<span>&nbsp;',
  49.                                 'link_after'  => '&nbsp;</span>'
  50.                             )
  51.                         ); ?>
  52.                         <div class="advisor-tags-cat">
  53.                             <?php if ( has_tag() ) { ?>
  54.                                 <div class="advisor-tags-index-page">
  55.                                     <i class="fa fa-tags"></i>
  56.                                     <?php the_tags( '', ', ' ); ?>
  57.                                 </div>
  58.                             <?php }
  59.                             if ( has_category() ) { ?>
  60.                                 <div class="advisor-categories">
  61.                                     <i class="fa fa-folder-open">&nbsp;</i>
  62.                                     <?php the_category( ', ', '' ); ?>
  63.                                 </div>
  64.                             <?php } ?>
  65.                         </div> <!-- .advisor-tags-cat -->
  66.                         <div class="advisor-clear"></div>
  67.                         <div class="advisor-bottom-post">
  68.                             <span class="advisor-for-go-top">
  69.                                 <a class="advisor-go-top" href="#top">
  70.                                     <?php _e( 'top', 'restaurant-advisor' ); ?>
  71.                                 </a>
  72.                             </span>
  73.                             <a class="advisor-read-more" href="<?php the_permalink(); ?>"></a>
  74.                         </div> <!-- .advisor-bottom-post -->
  75.                     </article> <!-- .advisor-the-post -->
  76.                     <div class="advisor-clear"></div>
  77.             <?php }
  78.             the_posts_pagination( array(
  79.                 'mid_size'           => 3,
  80.                 'prev_text'          => '<i class="fa fa-angle-double-left"></i>',
  81.                 'next_text'          => '<i class="fa fa-angle-double-right"></i>',
  82.                 'screen_reader_text' => '',
  83.             ) );
  84.         }
  85.         else { ?>
  86.             <h1 id="advisor-not_found"> <?php _e( 'Sorry, no posts were found' , 'restaurant-advisor' ); ?> </h1>
  87.             <?php get_search_form();
  88.         } ?>
  89.     </div> <!-- .advisor-posts -->
  90.     <?php get_sidebar(); ?>
  91. </div> <!-- .advisor-main -->
  92. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement