?> </a> </h2> <?php the_excerpt(); ?> <p><a href="<?php the_permalink(); ?> " class="">Read more</a></p> <?php affwp_post_thumbnail('large', true); ?> </div> <div class="item right"> </div> </section> <?php } ?> <?php
<article id="post-<?php the_ID(); ?> " <?php post_class(array('item', 'box', $coming_soon)); ?> > <div class="item-wrapper"> <?php $external_download_url = get_post_meta(get_the_ID(), '_affwp_addon_download_url', true); if (!affwp_addon_is_coming_soon(get_the_ID()) || current_user_can('manage_options')) { ?> <?php affwp_post_thumbnail('thumbnail', true); ?> <h2> <a href="<?php the_permalink(); ?> " title="<?php the_title_attribute(); ?> "> <?php the_title(); ?> </a> </h2>
<div class="primary item"> <?php while (have_posts()) { the_post(); ?> <article id="post-<?php the_ID(); ?> " <?php post_class(); ?> > <?php affwp_post_thumbnail(); ?> <div class="entry-content"> <?php the_content(__('Continue reading <span class="meta-nav">→</span>', 'affwp')); ?> </div> </article> <?php } ?> </div> <div class="item right bdr">
/** * Blog posts */ function affwp_blog() { global $post; // First, initialize how many posts to render per page $display_count = 3; // Next, get the current page $page = get_query_var('paged') ? get_query_var('paged') : 1; // Finally, we'll set the query arguments and instantiate WP_Query $args = array('post_type' => 'post', 'orderby' => 'date', 'order' => 'desc', 'posts_per_page' => $display_count, 'post__not_in' => array(get_the_ID()), 'page' => $page); $blog_query = new WP_Query($args); ?> <?php if (have_posts()) { ?> <section class="section columns columns-3 related-posts grid"> <header class="sub-header"> <h2>We also recommend</h2> </header> <div class="wrapper"> <?php while ($blog_query->have_posts()) { $blog_query->the_post(); ?> <div class="item box<?php if (has_post_thumbnail()) { echo ' has-post-thumbnail'; } if (has_excerpt()) { echo ' has-excerpt'; } ?> "> <div class="item-wrapper"> <?php affwp_post_thumbnail('thumbnail', true); ?> <?php affwp_posted_on(); ?> <h2><a title="<?php the_title_attribute(); ?> " href="<?php the_permalink(); ?> "><?php the_title(); ?> </a></h2> <?php $excerpt = $post->post_excerpt ? the_excerpt() : ''; echo $excerpt; ?> </div> <a title="<?php the_title_attribute(); ?> " href="<?php the_permalink(); ?> " class="link"> Read More → </a> </div> <?php } ?> <div class="gap"></div> <div class="gap"></div> </div> </section> <?php } wp_reset_postdata(); }
* * @package WordPress * @subpackage Twenty_Fourteen * @since Twenty Fourteen 1.0 */ ?> <article id="post-<?php the_ID(); ?> " <?php post_class(); ?> > <?php affwp_post_thumbnail('large'); if (!is_singular()) { affwp_the_title(); } ?> <?php if (is_search()) { ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div> <?php
/** * Addon popups */ function affwp_add_on_popups() { ?> <?php $args = array('post_type' => 'download', 'posts_per_page' => -1, 'tax_query' => array(array('taxonomy' => 'download_category', 'field' => 'slug', 'terms' => 'pro-add-ons'))); $wp_query = new WP_Query($args); ?> <div id="modal-pro-add-ons" class="modal addons popup entry-content mfp-with-anim mfp-hide"> <h1>Pro Add-ons</h1> <p>Pro add-ons are only available to <strong>Professional</strong> or <strong>Ultimate</strong> license-holders.</p> <?php if ($wp_query->have_posts()) { ?> <?php while ($wp_query->have_posts()) { $wp_query->the_post(); ?> <article> <?php if (!affwp_addon_is_coming_soon(get_the_ID())) { // don't show coming soon add-ons ?> <h2><?php the_title(); ?> </h2> <div class="columns columns-2"> <div class="wrapper"> <div class="item excerpt"> <?php the_excerpt(); ?> </div> <div class="item image"> <?php affwp_post_thumbnail('thumbnail', false); ?> </div> </div> </div> <?php } ?> </article> <?php } wp_reset_query(); ?> <?php } ?> </div> <div id="modal-third-party-add-ons" class="modal addons popup entry-content mfp-with-anim mfp-hide"> <?php $args = array('post_type' => 'download', 'posts_per_page' => -1, 'tax_query' => array(array('taxonomy' => 'download_category', 'field' => 'slug', 'terms' => '3rd-party'))); $third_party = new WP_Query($args); ?> <h1>Third Party Add-ons</h1> <?php if ($third_party->have_posts()) { ?> <?php while ($third_party->have_posts()) { $third_party->the_post(); $coming_soon = affwp_addon_is_coming_soon(get_the_ID()) ? 'coming-soon' : ''; ?> <article <?php post_class(array($coming_soon)); ?> > <?php if (!affwp_addon_is_coming_soon(get_the_ID()) || current_user_can('manage_options')) { ?> <h2><?php the_title(); ?> </h2> <div class="columns columns-2"> <div class="wrapper"> <div class="item excerpt"> <?php the_excerpt(); ?> </div> <div class="item image"> <?php affwp_post_thumbnail('thumbnail', false); ?> </div> </div> </div> <?php } elseif (affwp_addon_is_coming_soon(get_the_ID())) { ?> <h2><?php the_title(); ?> </h2> <?php the_excerpt(); ?> <div class="post-thumbnail"> <?php if (current_user_can('manage_options')) { ?> <?php affwp_post_thumbnail('thumbnail', false); ?> <?php } else { ?> <img alt="<?php the_title(); ?> - Coming Soon" src="<?php echo get_stylesheet_directory_uri() . '/images/add-ons-coming-soon.png'; ?> "> <?php } ?> </div> <?php } ?> </article> <?php } wp_reset_query(); ?> <?php } ?> </div> <?php $args = array('post_type' => 'download', 'posts_per_page' => -1, 'tax_query' => array(array('taxonomy' => 'download_category', 'field' => 'slug', 'terms' => 'official-free'))); $official_free = new WP_Query($args); ?> <div id="modal-offical-free-add-ons" class="modal addons popup entry-content mfp-with-anim mfp-hide"> <h1>Official Free Add-ons</h1> <?php if ($official_free->have_posts()) { ?> <?php while ($official_free->have_posts()) { $official_free->the_post(); $coming_soon = affwp_addon_is_coming_soon(get_the_ID()) ? 'coming-soon' : ''; ?> <article <?php post_class(array($coming_soon)); ?> > <?php if (!affwp_addon_is_coming_soon(get_the_ID()) || current_user_can('manage_options')) { ?> <h2><?php the_title(); ?> </h2> <div class="columns columns-2"> <div class="wrapper"> <div class="item excerpt"> <?php the_excerpt(); ?> </div> <div class="item image"> <?php affwp_post_thumbnail('thumbnail', false); ?> </div> </div> </div> <?php } elseif (affwp_addon_is_coming_soon(get_the_ID())) { ?> <h2><?php the_title(); ?> </h2> <?php the_excerpt(); ?> <div class="post-thumbnail"> <?php if (current_user_can('manage_options')) { ?> <?php affwp_post_thumbnail('thumbnail', false); ?> <?php } else { ?> <img alt="<?php the_title(); ?> - Coming Soon" src="<?php echo get_stylesheet_directory_uri() . '/images/add-ons-coming-soon.png'; ?> "> <?php } ?> </div> <?php } ?> </article> <?php } wp_reset_query(); ?> <?php } ?> </div> <?php }