if (!isset($template_args['class1'])) { $template_args['class1'] = ''; } if (!isset($template_args['class2'])) { $template_args['class2'] = ''; } $bundles = query_bundles(array('posts_per_page' => 3, 'orderby' => 'rand')); while ($bundles->have_posts()) { $bundles->the_post(); ?> <?php $url = post_meta('url'); if (!$url) { $url = get_permalink(); } $percentage = post_meta('savings'); $percentage = rtrim($percentage, '%'); if (!$percentage || $percentage === '') { $percentage = '30'; } ?> <a href="<?php echo $url; ?> " class="more <?php echo esc_attr($template_args['class1']); ?> "> <div class="more__save <?php echo esc_attr($template_args['class2']); ?>
} ?> <div class="post_inner_content clearfix"> <h1 class="post_title"> <?php the_title(); ?> </h1> <?php if (rd_options('reedwan_post_meta') == 1) { ?> <?php if ($author != '' || $date != '' || $comments != '' || $views != '' || $category != '') { ?> <div class="f_meta clearfix"> <?php echo post_meta($disqus_shortname, $author, $date, $comments, $views, $category); ?> </div> <?php } ?> <?php } ?> <?php the_content(); ?> <?php wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'corporative'), 'after' => '</div>')); ?> <?php
<?php namespace Yoast\YoastCom\Theme; ?> <ul class="list--unstyled list--breath"> <li><a href="<?php echo esc_url(url_plugin_overview()); ?> "><?php _e('Check out all Yoast plugins', 'yoastcom'); ?> »</a></li> <?php if (post_meta('github')) { ?> <li><a href="<?php echo esc_url(url_bug_report()); ?> ">Report a bug »</a></li> <li><a href="<?php echo esc_url(url_follow_dev()); ?> ">Follow development on GitHub »</a></li> <?php } ?> </ul> <?php
</a></h2> <h3 class="h2 tight color-academy--tertiary"><a href="<?php echo $url; ?> "><?php echo implode(' & ', array_map('esc_html', wp_list_pluck($products, 'post_title'))); ?> </a></h3> <?php the_content(); ?> <?php if (post_meta('savings')) { ?> <div class="more__save more__save--alone color-cta"> <?php printf(__('Save %s', 'yoastcom'), '<span>' . str_replace(' ', '', edd_currency_filter(post_meta('savings')))) . '</span>'; ?> </div> <?php } ?> <?php echo edd_get_purchase_link(array('class' => 'button default', 'text' => __('Buy this bundle now', 'yoastcom') . ' »')); ?> </div> </div> <?php
post_class(); ?> > <header> <h2 class="entry-title"><a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'lps'), the_title_attribute('echo=0')); ?> " rel="bookmark"><?php the_title(); ?> </a></h2> <?php post_meta(); ?> </header> <?php if (is_archive() || is_search()) { // Only display excerpts for archives and search. ?> <article class="entry-summary"> <?php custom_excerpt(45, "More Info"); ?> </article><!-- .entry-summary --> <?php } else { ?> <article class="entry-content">
/** * Allows putting the sidebar content higher up along the content than it would normally happen if there is other break out content * * @param array $atts * @param string $content * * @return string */ public function sidebar_content($atts, $content = null) { $out = $this->get_break_out_body(); $out .= '<section class="extra">'; if (!is_null($content)) { $content = trim($content); } if ('' === $content) { $content = wp_kses_post(post_meta('sidebar_content')); } $content = do_shortcode(shortcode_unautop(wpautop($content))); // Remove empty paragraphs. $content = str_replace('<p></p>', '', $content); $out .= $content; $out .= '</section>'; $out .= $this->get_restart_body(); return $out; }
/** * Returns the URL to the plugin changelog * * @return string */ function url_plugin_changelog() { $url = ''; // If the plugin is premium (buyable on yoast.com it has a changelog on yoast.com). if (post_meta('download_id')) { $url = get_permalink(get_the_ID()) . 'change-log/'; } return $url; }
function posts($atts, $content = null) { $atts = vc_map_get_attributes('posts', $atts); extract($atts); if ($column != 1) { wp_enqueue_script('isotop'); } $out = $grid = $metaAuthor = $date = $comments = $views = $category = $thumb = $width = $height = $isotope = $format_icon = $args = $my_query = ''; global $paged; $args = array('post_type' => 'post', 'category_name' => $cats, 'pagination' => true, 'posts_per_page' => $number, 'ignore_sticky_postss' => 1, 'paged' => $paged); $my_query = new WP_Query($args); if ($column == 1) { $grid = 'grid_12'; $metaAuthor = $date = $comments = $views = $category = 'view'; if ($social == 1) { $thumb = 'blog_column1_bar_share'; $width = 706; $height = 350; } else { $thumb = 'blog_column1_bar'; $width = 786; $height = 380; } } else { if ($column == 2) { $grid = 'grid_6'; $metaAuthor = $date = $comments = 'view'; } if ($column == 3) { $grid = 'grid_4'; $date = $comments = 'view'; } if ($layout_mode == 'masonry') { $thumb = 'blog_masonry'; $width = 697; $height = 9999; } else { $thumb = 'blog_nomasonry'; $width = 697; $height = 480; } } $grids_wrap = ' grids_wrap'; if ($layout_mode == 'masonry' && $column != 1) { $isotope = ' data-layout-mode="masonry"'; } if ($layout_mode == 'fitRows' && $column != 1) { $isotope = ' data-layout-mode="fitRows"'; } if ($column == 1) { $grids_wrap = ''; } if ($social != 'yes') { $format_icon = ' hide_angle'; } $out .= '<div class="wpb_content_element posts_wrap column_' . $column . '">'; $out .= wpb_widget_title(array('title' => $title)); $out .= '<div class="posts_layout' . $grids_wrap . '">'; $out .= '<div class="row_inner clearfix">'; $out .= '<ul class="grid_layout"' . $isotope . '>'; while ($my_query->have_posts()) { $my_query->the_post(); $disqus_shortname = $gallery = $audioURL = $videoURL = $format = $icon = $post_comment = ''; if (get_field('post_gallery')) { $gallery = get_field('post_gallery'); } if (get_field('post_video')) { $videoURL = get_field('post_video'); } if (get_field('post_audio')) { $audioURL = get_field('post_audio'); } if (has_post_format('video')) { $icon = 'icons-play'; $format = __('Video', 'corporative'); } elseif (has_post_format('audio')) { $icon = 'icons-music'; $format = __('Audio', 'corporative'); } elseif (has_post_format('gallery')) { $icon = 'icons-sliders-vertical'; $format = __('Gallery', 'corporative'); } else { $icon = 'icons-document-fill'; $format = ''; } if (get_field('post_comment')) { $post_comment = get_field('post_comment'); } if ($post_comment == 'comment_default' || empty($post_comment)) { $post_comment = rd_options('reedwan_post_comment'); } if ($post_comment == 'comment_disqus') { $disqus_shortname = rd_options('reedwan_disqus_shortname'); } $out .= '<li id="post-' . get_the_ID() . '" class="grid_item no_title_thumb ' . $grid . '">'; $out .= '<div class="post_b">'; if ($social == 'yes') { $out .= '<a href="' . get_permalink() . '" class="post_format lefttip" title="' . $format . '"><i class="' . $icon . '"></i></a>'; $out .= '<div class="social post_social">'; $out .= '<a href="http://twitter.com/home?status=' . get_the_title() . ' ' . get_permalink() . '" target="_blank" class="lefttip" title="Twitter"><i class="icons-social-twitter"></i></a>'; $thumbx = ''; $thumbx = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'facebook'); $out .= '<a href="http://www.facebook.com/sharer.php?s=100&p[title]=' . urlencode(get_the_title()) . '&p[summary]=' . urlencode(get_the_excerpt()) . '&p[url]=' . urlencode(get_permalink()) . '&p[images][0]=' . urlencode($thumbx[0]) . '" target="_blank" class="lefttip" title="Facebook"><i class="icons-social-facebook"></i></a>'; $out .= '<a href="https://plus.google.com/share?url=' . get_permalink() . '" onclick="javascript:window.open(this.href,"", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600");return false;" target="_blank" class="lefttip" title="Google Plus"><i class="icons-social-google-plus"></i></a>'; $thumby = ''; $thumby = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'medium'); $out .= '<a href="http://pinterest.com/pin/create/button/?url=' . urlencode(get_permalink()) . '&description=' . urlencode(get_the_title()) . '&media=' . urlencode($thumby[0]) . '" target="_blank" class="lefttip" title="Pinterest"><i class="icons-social-pinterest"></i></a>'; $out .= '</div>'; } $out .= '<div class="post_content' . $format_icon . '">'; if ($layout_mode == 'masonry') { $out .= mediaholder('', $format, $thumb, $videoURL, $audioURL, $gallery); } else { $out .= mediaholder_caption('', $format, $width, $height, $thumb, $videoURL, $audioURL, $gallery); } $out .= '<div class="post_inner_content clearfix">'; $out .= '<h2 class="post_title"> <a href="' . get_permalink() . '" title="">' . get_the_title() . '</a></h2>'; if ($meta == 'yes') { $out .= '<div class="f_meta clearfix">'; $out .= post_meta($disqus_shortname, $metaAuthor, $date, $comments, $views, $category); $out .= '</div>'; } $out .= excerpt($excerpt); if ($more == 'yes') { $out .= '<div class="right more"><a href="' . get_permalink() . '">' . __('Read More', 'corporative') . ' →</a></div>'; } $out .= '</div>'; $out .= '</div>'; $out .= '</div>'; $out .= '</li>'; } wp_reset_postdata(); $out .= '</ul>'; $out .= '</div>'; if ($pagination == 'yes') { $out .= new_pagination($my_query->max_num_pages); } $out .= '</div>'; $out .= '</div>'; return $out; }
namespace Yoast\YoastCom\Theme; if (isset($template_args['testimonial'])) { $testimonial = $template_args['testimonial']; } else { $testimonial = post_meta('testimonial'); } if ($testimonial === '') { return; } if (isset($template_args['image_id'])) { $image = wp_get_attachment_image($template_args['image_id'], array(140, 140)); } elseif (isset($template_args['image_url'])) { $image = sprintf('<img src="%s" width="140" height="140" />', $template_args['image_url']); } else { $image_meta = post_meta('testimonial_image'); if (strpos($image_meta, 'http') === 0) { $image = sprintf('<img src="%s" width="140" height="140" />', $image_meta); } else { $image = wp_get_attachment_image($image_meta, array(140, 140)); } } ?> <div class="testimonial"> <div class="media media--nofloat"> <div class="img--right hide-on-tablet"> <?php echo $image; ?> </div> <div class="bd">
<section class="row iceberg"> <h1><?php the_title(); ?> </h1> <?php get_template_part('html_includes/partials/promoblocks-academy', array('academy' => true)); ?> </section> <?php if (post_meta('announcement_link')) { ?> <?php get_template_part('html_includes/partials/banner-announcement', array('url' => post_meta('announcement_link'), 'text' => post_meta('announcement_text'), 'banner' => post_meta('announcement_image'))); ?> <?php } ?> <div class="island"> <?php get_template_part('html_includes/partials/newsletter-subscribe', array('class' => 'fill--secondary')); ?> </div> <div class="rowholder"> <section class="row island"> <h2><?php _e('Check out our Must Read Articles', 'yoastcom');
</div> </div> </div> <hr class="hr--no-pointer"> <div class="row iceberg"> <section class="content"> <?php if (post_meta('promo_video_embed')) { ?> <div class="iceberg"> <div class="videowrapper"> <?php echo wp_oembed_get(post_meta('promo_video_embed')); ?> </div> </div> <?php } ?> <?php the_content(); ?> </section> <?php get_template_part('html_includes/partials/social-share'); ?>
echo esc_html($template_args['heading']); ?> </h2> <?php $bundles = query_bundles(array('post__in' => $template_args['bundles'], 'posts_per_page' => 2)); ?> <?php while ($bundles->have_posts()) { $bundles->the_post(); ?> <?php $url = post_meta('url'); if (!$url) { $url = get_permalink(); } $savings = trim(post_meta('savings')); if (empty($savings)) { $savings = '20'; } ?> <a href="<?php echo esc_url($url); ?> " class="more "> <div class="more__save "><?php printf(__('Save %s', 'yoastcom'), '<span>' . $savings . '</span>'); ?> </div> <div class="more__holder"> <div class="more__title"><?php
function category() { // Determine what category is being shown, and generate category object & list of subcategories $category_id = get_query_var('cat'); $category = get_category($category_id); $subcategories = get_categories('hide_empty=0&parent=' . $category_id); // Display a customized category intro panel, for top-level categories only if ($category->category_parent === 0) { ?> <header class="category-intro <?php echo $category->slug; ?> "> <img src="<?php bloginfo(stylesheet_directory); ?> /custom/images/categories/<?php echo $category->slug; ?> .jpg"> <div> <h1><i class="icon-header-fleuron-left"></i><?php echo $category->name; ?> <i class="icon-header-fleuron-right"></i></h1> <p><?php echo str_replace('#', get_category_link($category->term_id), $category->description); ?> </p> </div> </header> <?php } else { ?> <section class="headline_area"> <h1 class="entry-title"><?php echo $category->name; ?> </h1> </section> <?php } // If we're in the Design Resources category, display an expandable panel with a list of sub-categories if ($category->name === "Design Resources") { $series_subcategories = array_slice($subcategories, 0, 4); $print_subcategories = array_slice($subcategories, 4); ?> <a href="#" class="subcategory-expander-link"><i class="icon-caret-down"></i>By series or print</a> <section class="subcategory-expander"> <div> <section> <h2><i class="icon-bullet-fleuron"></i>By series</h2> <ul> <?php foreach ($series_subcategories as $subcategory) { echo '<li>' . $count . '<a href="' . get_category_link($subcategory->term_id) . '">' . $subcategory->name . '</a></li>'; } ?> </ul> </section> <section> <h2><i class="icon-bullet-fleuron"></i>By print</h2> <?php $count = 0; foreach ($print_subcategories as $subcategory) { if ($count % 3 === 0) { echo '<ul>'; } echo '<li><a href="' . get_category_link($subcategory->term_id) . '">' . $subcategory->name . '</a></li>'; $count++; if ($count % 3 === 0 or $count - 1 === count($print_subcategories)) { echo '</ul>'; } } ?> </section> </div> </section> <?php } ?> <?php // If we're in the Shopping Guides category, display a styled block for each sub-category if ($category->name === "Shopping Guides") { foreach ($subcategories as $subcategory) { ?> <div class="subcategory <?php echo smarter_slug($subcategory); ?> "> <h2><?php echo $subcategory->name; ?> </h2> <?php // Currently featured category should show an "Updated for..." badge global $featured; if ($subcategory->term_id == $featured->term_id) { ?> <img class="badge" src="<?php bloginfo(stylesheet_directory); ?> /custom/images/updated-for-2015.png" alt="Updated for 2015"/> <?php } ?> <p class="read-more"><a href="<?php echo get_category_link($subcategory->term_id); ?> ">Read more</a></p> <a class="div-link" href="<?php echo get_category_link($subcategory->term_id); ?> "></a> </div> <?php } // Otherwise, display a list of posts } else { while (have_posts()) { the_post(); echo '<div class="post-excerpt">'; if (has_post_thumbnail()) { ?> <a href="<?php the_permalink(); ?> " title="<?php the_title_attribute(); ?> " > <?php the_post_thumbnail(''); ?> </a> <?php } ?> <div class="headline_area"> <?php echo post_meta(); ?> <a href="<?php the_permalink(); ?> "><h2 class="entry-title"><?php echo get_the_title(); ?> </h2></a> </div> <div class="format_text entry-content"> <p><?php the_advanced_excerpt('length=40&use_words=1&no_custom=1&ellipsis=&finish_sentence=1'); ?> </p> <p class="read-more"><a href="<?php the_permalink(); ?> " rel="bookmark" title="<?php the_title(); ?> ">Read more</a></p> </div> </div> <?php } } }
</div> <?php while (have_posts()) { the_post(); ?> <article class="row"> <?php get_template_part('html_includes/partials/ebook'); ?> <?php if (post_meta('testimonial')) { ?> <blockquote><?php echo kses_blockquote(post_meta('testimonial')); ?> </blockquote> <?php } ?> </article> <hr> <?php } ?> <?php $bundles = query_bundles(array('query_ebook_bundles' => true)); $i = 0;
/** * Whether or not to skip social buttons on this page. * * @return bool */ function yst_skip_social() { static $skip_social; if (!isset($skip_social)) { if (is_singular()) { global $post; if (get_post_meta($post->ID, 'no_social', true) || 'on' === post_meta('hide_social_share')) { $skip_social = true; } else { $skip_social = false; } } else { $skip_social = false; } } return $skip_social; }
</div> </div> <?php } ?> <div class="bd"> <h2 class="tight"> <a href="<?php the_permalink(); ?> "><?php the_title(); ?> »</a> </h2> <?php the_excerpt(); ?> <?php if (post_meta('download_id')) { ?> <?php echo edd_get_purchase_link(array('download_id' => post_meta('download_id'), 'text' => __('Order this Course now', 'yoastcom') . ' »')); ?> <?php } ?> </div> </div> <?php
?> <?php if (url_plugin_changelog()) { ?> <p><?php printf(__('See the %s if you want details about recent changes.', 'yoastcom'), '<a href="' . esc_url(url_plugin_changelog()) . '">changelog</a>'); ?> </p> <?php } ?> </div> <div class="one-third"> <?php if (post_meta('extra_content')) { ?> <?php echo post_meta('extra_content'); ?> <?php } ?> </div> <div class="one-third"> <?php get_template_part('html_includes/partials/plugin-refer-links'); ?> </div> </section> <?php
?> </a> <?php } ?> <div class="bd"> <h2 class="tight"> <a href="<?php the_permalink(); ?> "><?php the_title(); ?> »</a> </h2> <?php the_excerpt(); ?> <?php if (post_meta('download_id')) { ?> <?php echo edd_get_purchase_link(array('download_id' => post_meta('download_id'), 'text' => __('Buy this ebook now', 'yoastcom') . ' »')); ?> <?php } ?> </div> </div> <?php
</div> </div> <div class="one-fourth"> <div class="promoblock promoblock--icon-<?php echo post_meta('block_right_icon'); ?> arrowed-small"> <h2 class="h3"><a href="<?php echo esc_url(post_meta('block_right_link')); ?> "><?php echo esc_html(post_meta('block_right_title')); ?> </a></h2> <p class="hide-on-mobile"> <?php echo esc_html(post_meta('block_right_description')); ?> <a href="<?php echo esc_url(post_meta('block_right_link')); ?> " class="color-cta font-default"><?php echo esc_html(post_meta('block_right_link_text')); ?> »</a> </p> </div> </div> </div> <?php
?> <div class="row island iceberg"> <section class="content"> <?php the_content(); ?> </section> <?php if (!post_has_shortcode('sidebar-content')) { ?> <section class="extra"> <?php echo wpautop(do_shortcode(wp_kses_post(post_meta('sidebar_content')))); ?> </section> <?php } ?> </div> <hr class="hr--no-pointer"> <?php if (!post_has_shortcode('testimonial')) { ?> <div class="row island"> <?php
#download-plugin" class="button default"><?php printf(__('Buy Premium from $%d', 'yoastcom'), get_post_meta($premium_plugin, 'min_price', true)); ?> »</a> <?php } ?> <?php if (post_meta('download_id')) { ?> <a href="#download-plugin" class="button default"><?php printf(__('Buy Premium from $%d', 'yoastcom'), post_meta('min_price')); ?> »</a> <?php } ?> <?php if (post_meta('plugin')) { ?> <a href="<?php echo esc_url(url_plugin_download()); ?> " class="button dimmed"><?php _e('Download the free plugin', 'yoastcom'); ?> »</a> <?php }