Guest User

Custom home

a guest
Nov 18th, 2015
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.75 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Template Name: Homepage
  4.  *
  5.  * @package Betheme
  6.  * @author Muffin group
  7.  * @link http://muffingroup.com
  8.  */
  9.  
  10. get_header();
  11. ?>
  12.    
  13. <!-- #Content -->
  14. <div id="Content">
  15.  
  16.     <!-- Page Editor Section -->
  17.     <div class="sections">
  18.         <div class="entry-content" itemprop="mainContentOfPage">
  19.             <?php
  20.                 while ( have_posts() ){
  21.                     the_post();                         // Post Loop
  22.                     mfn_builder_print( get_the_ID() );  // Content Builder & WordPress Editor Content
  23.                 }
  24.             ?>
  25.         </div>
  26.     </div>
  27.  
  28.     <div class="content_wrapper clearfix">
  29.  
  30.         <!-- .sections_group -->
  31.         <div class="sections_group">
  32.        
  33.             <div class="entry-content" itemprop="mainContentOfPage">
  34.  
  35.                 <div class="section the_content has_content">
  36.                     <div class="section_wrapper">
  37.                         <div class="the_content_wrapper">
  38.  
  39.                         <div id="post-list">
  40.                             <h1>Latest Update</h1>
  41.  
  42.                             <?php
  43.                             $query_args = array(
  44.                                 'post_type' => 'post'
  45.                             );
  46.                             $the_query = new WP_Query( $query_args );
  47.                             ?>
  48.  
  49.                             <ul>
  50.                             <?php if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
  51.                                 <li <?php post_class(); ?>><a href="<?php the_permalink(); ?>" title="link to <?php echo the_title(); ?>"><i class="fa fa-arrow-circle-o-right"></i> <?php echo the_title(); ?></a></li>
  52.                             <?php endwhile; ?>
  53.                             </ul>
  54.  
  55.                             <?php wp_reset_postdata(); ?>
  56.  
  57.                             <?php else: ?>
  58.                             <article>
  59.                                 <h1>Sorry...</h1>
  60.                                 <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
  61.                             </article>
  62.                             <?php endif; ?>
  63.  
  64.                             </div>
  65.  
  66.                         </div>
  67.                     </div>
  68.                 </div>
  69.  
  70.             </div>
  71.    
  72.         </div>
  73.        
  74.         <!-- .four-columns - sidebar -->
  75.         <?php get_sidebar(); ?>
  76.  
  77.     </div>
  78. </div>
  79.  
  80. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment