Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Template Name: Home Page Template
- *
- * Description: Use this page template for a page with VC plugin.
- *
- * @package WordPress
- * @subpackage OneSocial Theme
- * @since OneSocial 1.0.0
- */
- get_header();
- ?>
- <div id="primary" class="site-content">
- <div id="content" role="main">
- <?php while ( have_posts() ) : the_post(); ?>
- <?php get_template_part( 'template-parts/content', 'page' ); ?>
- <?php endwhile; // end of the loop. ?>
- </div>
- <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Home Middle") ) : ?><?php endif; ?>
- <div class="mainright">
- <?php
- // BETTER
- $query = array (
- 'post_type' => 'post',
- 'post_status' => 'publish',
- 'order' => 'desc',
- 'tag' => 'home'
- );
- $queryObject = new WP_Query($query);
- if ($queryObject->have_posts()) {
- while ($queryObject->have_posts()) {
- echo '<article class="post entry">';
- echo '<a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '">'; // Original Grid
- echo get_the_post_thumbnail( $post->ID, 'thumbnail', array( 'class' => 'alignright post-image entry-image' ) );
- echo '</a>';
- echo '<header class="entry-header"><h2 class="entry-title" id="hmes" itemprop="headline"><a href="' . get_permalink() . '"> ' . get_the_title() . ' </a> </h2></header>'; // show the title
- echo '<footer class="entry-footer">';
- echo 'By <span class="entry-author" itemprop="author" itemscope="itemscope" itemtype="https://schema.org/Person">';
- echo bp_core_get_userlink(get_the_author_meta('ID'));
- echo '</span>';
- echo '<p class="timeb">';
- echo '<i class="icon-bookmark"></i>';
- echo '</p>';
- echo '</footer></article>';
- }
- }
- ?>
- </div>
- </div>
- <?php
- get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement