Skip to content

Commit

Permalink
Schema -- archive-gear_post.php Product Reviews Archive Page BlogPost…
Browse files Browse the repository at this point in the history
…ing schema
  • Loading branch information
Andre Bulatov committed Mar 2, 2016
1 parent 2efa8b9 commit 59578cd
Showing 1 changed file with 87 additions and 67 deletions.
154 changes: 87 additions & 67 deletions wp-content/themes/mag-wp/archive-gear_post.php
Expand Up @@ -14,10 +14,11 @@
</div>

<!-- Begin Wrap Content -->
<div class="wrap-fullwidth">
<div class="wrap-fullwidth hfeed h-feed">

<!-- Begin Main Home Content 950px -->
<div class="home-content">
<div class="home-content"
itemprop="mainContentOfPage" itemscope itemtype="http://schema.org/WebPageElement">

<div class="section-top-title">
<h3><?php _e('Latest Gear Reviews', 'anthemes'); ?></h3>
Expand All @@ -36,20 +37,43 @@
query_posts( array( 'post_type' => 'gear_post', 'paged' => $paged ) );
if (have_posts()) : while (have_posts()) : the_post();
?>
<li <?php post_class('hentry h-entry') ?> id="post-<?php the_ID(); ?>">
<?php if ( has_post_thumbnail()) { ?>
<li <?php post_class('hentry h-entry') ?> id="post-<?php the_ID(); ?>" itemscope itemprop="hasPart" itemtype="http://schema.org/BlogPosting">
<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="<?php the_permalink(); ?>"/>
<span itemprop="publisher" itemscope itemtype="https://schema.org/Organization">
<meta itemprop="name" content="EARMILK">
<span itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">
<meta itemprop="url" content="http://earmilk.com/wp-content/uploads/2016/02/EARMILK_logo_3.png">
<meta itemprop="width" content="229">
<meta itemprop="height" content="50">
</span>
</span>

<div class="entry-thumb-cont">
<a href="<?php the_permalink(); ?>" class="entry-thumbnail">
<?php echo the_post_thumbnail('large'); ?>
<a href="<?php the_permalink(); ?>" class="entry-thumbnail">
<span itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
<?php
$post_thumbnail_id = get_post_thumbnail_id();
$post_thumbnail_url = wp_get_attachment_url( $post_thumbnail_id );
?>
<?php if ( has_post_thumbnail() ) { ?>
<?php if ( get_the_post_thumbnail() ) { ?>
<?php echo the_post_thumbnail('large'); ?>
<meta itemprop="url" content="<?php echo $post_thumbnail_url; ?>" />
<?php } else { ?>
<?php echo fallback_thumbnail_image(); ?>
<meta itemprop="url" content="<?php echo fallback_thumbnail_image('src'); ?>" />
<?php } // Post with messed up Thumbnail ?>
<?php } else { ?>
<!-- post has no thumbnail -->
<?php echo fallback_thumbnail_image(); ?>
<meta itemprop="url" content="<?php echo fallback_thumbnail_image('src'); ?>" />
<?php } // Post Thumbnail ?>
<meta itemprop="width" content="283" />
<meta itemprop="height" content="133" />
</span>
</a>
<?php } else { ?>
<a href="<?php the_permalink(); ?>" class="entry-thumbnail">
<img src="<?php echo get_template_directory_uri(); ?>/images/article-img.png" alt="article image" />
</a>
<?php } // Post Thumbnail ?> <div class="clear"></div>
<div class="clear"></div>

<div class="article-category">

<div class="article-category">
<div class="post-date date updated">
<?php if ( get_the_time('Y') == date('Y')) { ?>
<meta itemprop="datePublished" content="<?php the_time('c'); ?>"/>
Expand All @@ -68,76 +92,72 @@
</a>
<?php } ?>
</div>
<span class="vcard author p-author h-card">
<span class="fn">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
<spam class="entry-author-first given-name"><?php the_author_meta('first_name'); ?></spam>
<span class="entry-author-last family-name"><?php the_author_meta('last_name'); ?></span>
</a>
<span class="vcard author p-author h-card" itemprop="author" itemscope itemtype="https://schema.org/Person">
<span class="fn" itemprop="name">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" itemprop="url">
<spam class="entry-author-first given-name"><?php the_author_meta('first_name'); ?></spam>
<span class="entry-author-last family-name"><?php the_author_meta('last_name'); ?></span>
</a>
</span>
</span>
</span>
<?php
$category = get_the_category();
if ($category) { $cat_name = 'genre-' . preg_replace('/\s+/', '', strtolower($category[0]->name)); };
echo '<a href="' . get_category_link( $category[0]->term_id ) . '" class="tiptipBlog ' . $cat_name . '" title="' . sprintf( __( "View all posts in %s", "anthemes" ), $category[0]->name ) . '" rel="tag" ' . '>' . $category[0]->name.'</a> ';
?>
</div>
</div>
</div>

<div class="an-content">
<h2 class="article-title entry-title">
<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
</h2>
<p class="article-summary entry-summary"><?php echo anthemes_excerpt(strip_tags(strip_shortcodes(get_the_excerpt())), 130); ?></p>
<div class="entry-footer">
<div class="entry-comment-count">
<i class="fa fa-comments-o"></i>&nbsp;&nbsp;&nbsp;<div class="facebook-comment-count"><fb:comments-count href="<?php echo get_permalink($post->ID); ?>"></fb:comments-count></div>
</div>
<div class="entry-read-more">
<a href="<?php the_permalink(); ?>" title="Read the whole article.">Read More...</a>
</div>
<div class="entry-empty-box">&nbsp;
<div class="an-content">
<h2 class="article-title entry-title" itemprop="name headline">
<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
</h2>
<p class="article-summary entry-summary" itemprop="description">
<?php echo anthemes_excerpt(strip_tags(strip_shortcodes(get_the_excerpt())), 137); ?>
</p>
<div class="entry-footer">
<div class="entry-comment-count">
<a href="<?php the_permalink(); ?>#comments">
<i class="fa fa-comments-o"></i>&nbsp;&nbsp;&nbsp;
<?php comments_number( 'add 2 cents', '1 comment', '% comments' ) ?>
</a>
</div>
<div class="entry-read-more">
<a href="<?php the_permalink(); ?>" title="Read the whole article.">Read More...</a>
</div>
<div class="entry-empty-box">&nbsp;</div>
</div>

<?php if(function_exists('taqyeem_get_score')) { ?>
<?php taqyeem_get_score(); ?>
<?php } ?>
</div>
</div>

</div><!-- end .an-content -->

</li>
<?php endwhile; endif; ?>
</ul><!-- end .classic-blog -->
</div><!-- end .an-content -->
</li>
<?php endwhile; endif; ?>
</ul><!-- end .classic-blog -->

<!-- Pagination -->
<div class="line-bottom"></div>
<div class="clear"></div>
<?php if(function_exists('wp_pagenavi')) { ?>
<?php wp_pagenavi(); ?>
<?php } else { ?>
<div class="defaultpag">
<div class="sright"><?php next_posts_link('' . __('Older Entries', 'anthemes') . ' &rsaquo;'); ?></div>
<div class="sleft"><?php previous_posts_link('&lsaquo; ' . __('Newer Entries', 'anthemes') . ''); ?></div>
</div>
<?php } ?>
<!-- pagination -->
<!-- Pagination -->
<div class="line-bottom"></div>
<div class="clear"></div>
<?php if(function_exists('wp_pagenavi')) { ?>
<?php wp_pagenavi(); ?>
<?php } else { ?>
<div class="defaultpag">
<div class="sright"><?php next_posts_link('' . __('Older Entries', 'anthemes') . ' &rsaquo;'); ?></div>
<div class="sleft"><?php previous_posts_link('&lsaquo; ' . __('Newer Entries', 'anthemes') . ''); ?></div>
</div>
<?php } ?>
<!-- pagination -->

<?php if (!empty($smof_data['home728'])) { ?>
<div class="home-728">
<div class="img728">
<?php echo stripslashes($smof_data['home728']); ?>
</div>
</div>
<?php } ?>
</div><!-- end .home-content -->
</div><!-- end .home-content -->


<!-- Begin Sidebar 1 (default right) -->
<?php get_sidebar(); // add sidebar ?>
<!-- end #sidebar 1 (default right) -->
<!-- Begin Sidebar 1 (default right) -->
<?php get_sidebar(); // add sidebar ?>
<!-- end #sidebar 1 (default right) -->


<div class="clear"></div>
</div><!-- end .wrap-fullwidth -->

<?php get_footer(); // add footer ?>
<?php get_footer(); // add footer ?>

0 comments on commit 59578cd

Please sign in to comment.