function woo_widget_tabs_latest($posts = 5, $size = 45) { global $post; $latest = get_posts(array('suppress_filters' => false, 'ignore_sticky_posts' => 1, 'orderby' => 'post_date', 'order' => 'desc', 'numberposts' => $posts)); foreach ($latest as $post) { setup_postdata($post); ?> <li> <?php if ($size != 0) { woo_image('height=' . $size . '&width=' . $size . '&class=thumbnail&single=true'); } ?> <a title="<?php the_title_attribute(); ?> " href="<?php the_permalink(); ?> "><?php the_title(); ?> </a> <span class="meta"><?php the_time(get_option('date_format')); ?> </span> <div class="fix"></div> </li> <?php } wp_reset_postdata(); }
function add_image_RSS($content) { global $post, $id; $blog_key = substr(md5(home_url('/')), 0, 16); if (!is_feed()) { return $content; } // Get the "image" from custom field //$image = get_post_meta($post->ID, 'image', $single = true); $image = woo_image('return=true&link=url'); $image_width = '240'; // If there's an image, display the image with the content if ($image != '') { $content = '<p style="float:right; margin:0 0 10px 15px; width:' . $image_width . 'px;"> <img src="' . $image . '" width="' . $image_width . '" /> </p>' . $content; return $content; } else { $content = $content; return $content; } }
$count = 0; ?> <?php while (have_posts()) { the_post(); $count++; ?> <!-- Post Starts --> <div <?php post_class(); ?> > <?php woo_image('width=' . $woo_options['woo_thumb_w'] . '&height=' . $woo_options['woo_thumb_h'] . '&class=thumbnail ' . $woo_options['woo_thumb_align']); ?> <h2 class="title"><a href="<?php the_permalink(); ?> " rel="bookmark" title="<?php the_title(); ?> "><?php the_title(); ?> </a></h2> <p class="post-meta">
<?php woo_post_inside_before(); if (isset($woo_options['woo_magazine_b_w']) && ($woo_options['woo_magazine_b_w'] <= 0 || $woo_options['woo_magazine_b_w'] == '') || !isset($woo_options['woo_magazine_b_w'])) { $woo_options['woo_magazine_b_w'] = '100'; } if (isset($woo_options['woo_magazine_b_h']) && $woo_options['woo_magazine_b_h'] <= 0) { $woo_options['woo_magazine_b_h'] = '100'; } if (isset($woo_options['woo_magazine_grid_post_content']) && $woo_options['woo_magazine_grid_post_content'] != 'content') { } ?> <a href="<?php echo get_permalink(); ?> "><?php woo_image('link=img&width=' . $woo_options['woo_magazine_b_w'] . '&height=' . $woo_options['woo_magazine_b_h'] . '&class=thumbnail ' . $woo_options['woo_magazine_b_align']); ?> </a> <header> <?php the_title($title_before, $title_after); ?> </header> <?php woo_post_meta(); ?> <section class="entry"> <?php if (isset($woo_options['woo_magazine_grid_post_content']) && $woo_options['woo_magazine_grid_post_content'] == 'content') { the_content();
/** * Maybe add the featured image to the RSS feed. * @param string $content The content of the specified RSS feed item. * @since 1.0.0 * @return string */ function add_image_RSS($content) { if (!is_feed()) { return $content; } global $post, $id; // Get the "image" from custom field $image = woo_image('return=true&link=url'); $image_width = intval(apply_filters('wf_add_image_to_rss_width', 240)); // If there's an image, display the image with the content if ('' != $image) { $content = '<p style="float: right; margin: 0 0 10px 15px; width:' . esc_attr(intval($image_width)) . 'px; height: auto;"> <img src="' . esc_url($image) . '" width="' . esc_attr(intval($image_width)) . '" style="max-width: 100%; height: auto;" /> </p>' . $content; } return $content; }
function woo_shortcode_pinterest($atts, $content = null) { global $post; $defaults = array('count' => 'horizontal', 'float' => 'none', 'url' => '', 'image_url' => '', 'description' => '', 'use_post' => 'false'); $atts = shortcode_atts($defaults, $atts); extract($atts); $allowed_floats = array('left' => ' fl', 'right' => ' fr', 'none' => ''); if (!in_array($float, array_keys($allowed_floats))) { $float = 'none'; } $allowed_counts = array('horizontal', 'vertical', 'none'); if (!in_array($count, array_keys($allowed_counts))) { $count = 'horizontal'; } $output = ''; // Use the custom URL, if it has been specified. if ($atts['url'] != '') { $url = esc_url($atts['url']); } else { // Use the URL to the current $post in the loop. $url = esc_url(get_permalink($post)); } // Use the custom image URL, if it has been specified. if ($atts['image_url'] != '') { $image_url = esc_url($atts['image_url']); } else { // Use the image of the current $post in the loop. $image_url = esc_url(woo_image('link=url&return=true')); } // Use the custom description, if it has been specified. if ($atts['description'] != '') { $description = esc_attr($atts['description']); } else { // Use the excerpt of the current $post in the loop, if no description is set and if instructed to do so. if ($atts['use_post'] == 'true') { $description = esc_attr(strip_shortcodes(apply_filters('get_the_excerpt', $post->post_excerpt))); } } $output = apply_filters('woo_shortcode_pinterest', '<div class="shortcode-pinterest' . esc_attr($allowed_floats[$float]) . '"><a href="' . esc_url('http://pinterest.com/pin/create/button/?url=' . esc_url($url) . '&media=' . esc_url($image_url) . '&description=' . $description) . '" class="pin-it-button" count-layout="' . esc_attr($count) . '">' . __('Pin It', 'selftitled') . '</a></div><!--/.shortcode-pinterest-->' . "\n", $atts); // Enqueue the Pinterest button JavaScript from their API. add_action('wp_footer', 'woo_shortcode_pinterest_javascript'); add_action('woo_shortcode_generator_preview_footer', 'woo_shortcode_pinterest_javascript'); return $output . "\n"; }
<div class="row spacing"> <div class="col-sm-9"> <?php if (have_posts()) { $count = 0; while (have_posts()) { the_post(); $count++; ?> <div class="center news-summary"> <?php if ($settings['thumb_single'] == 'true') { woo_image('width=800px' . '&height=620px' . '&class=' . $settings['class']); } ?> <?php woo_post_meta(); ?> <span class="tags date"><?php the_time(get_option('date_format')); ?> </span> <a class="news-title" href="<?php the_permalink(); ?> "><h3 class="news-title"><?php the_title();
if ($custom_url != '') { $settings['large'] = $custom_url; } ?> <article id="portfolio-item-id-<?php the_ID(); ?> " <?php post_class('portfolio-item'); ?> > <?php /* Setup image for display and for checks, to avoid doing multiple queries. */ $image = woo_image('width=207&height=212&link=img&return=true&class=thumbnail'); $image_src = woo_image('width=207&height=212&link=url&return=true&class=thumbnail'); if (!$image) { $image = '<img src="' . get_template_directory_uri() . '/images/temp-portfolio.png" alt="" />'; } ?> <a <?php echo $settings['rel']; ?> title="<?php echo $settings['caption']; ?> " href="<?php echo $settings['large']; ?> " class="item drop-shadow curved curved-hz-1"> <?php
exit; } /** * The default template for displaying content */ global $woo_options; ?> <article <?php post_class(); ?> > <?php if (isset($woo_options['woo_post_content']) && $woo_options['woo_post_content'] != 'content') { woo_image('width=100&height=100&class=thumbnail alignleft'); } ?> <header> <h1><a href="<?php the_permalink(); ?> " rel="bookmark" title="<?php the_title_attribute(); ?> "><?php the_title(); ?> </a></h1> <?php
function woo_display_post_image() { global $woo_options; $display_image = false; $width = $woo_options['woo_thumb_w']; $height = $woo_options['woo_thumb_h']; $align = $woo_options['woo_thumb_align']; if (is_single() && isset($woo_options['woo_thumb_single']) && $woo_options['woo_thumb_single'] == 'true') { $width = $woo_options['woo_single_w']; $height = $woo_options['woo_single_h']; $align = $woo_options['woo_thumb_align_single']; $display_image = true; } if (get_option('woo_woo_tumblog_switch') == 'true') { $is_tumblog = woo_tumblog_test(); } else { $is_tumblog = false; } if ($is_tumblog || is_single() && @$woo_options['woo_thumb_single'] == 'false') { $display_image = false; } if ($display_image == true && !woo_embed('')) { woo_image('width=' . $width . '&height=' . $height . '&class=thumbnail ' . $align); } }
} else { if (isset($url) && $url != '') { ?> <a href="<?php echo $url; ?> " rel="bookmark" title="<?php the_title_attribute(); ?> "> <?php } if ($slidertype != "full") { woo_image('width=960&height=' . $settings['featured_height'] . '&class=slide-image&link=img&noheight=true'); } else { woo_image('width=2560&height=' . $settings['featured_height'] . '&class=slide-image full&link=img&noheight=true'); } if (isset($url) && $url != '') { ?> </a><?php } } ?> <?php if (!$has_embed or $has_embed && $settings['slider_video_title'] != "true") { // Hide title/description if video post ?> <div class="slide-content-container"> <article class="slide-content col-full <?php if (!$has_embed) {
?> <a href="<?php echo $url; ?> " title="<?php the_title(); ?> "><?php woo_image('key=image&width=920&height=338&class=slide-img&link=img'); ?> </a> <?php } else { ?> <?php woo_image('key=image&width=920&height=338&class=slide-img&link=img'); } ?> </div><!-- /.slide-image --> <?php } elseif ($has_video) { echo woo_embed('key=embed&width=500&class=video'); } ?> <div class="fix"></div> <?php } else { ?>
<div id="featured-th"> <ul class="idTabs"> <?php $the_query = new WP_Query('category_name=' . $featuredcat . '&showposts=5&orderby=post_date&order=desc'); $counter = 0; while ($the_query->have_posts()) : $the_query->the_post(); $do_not_duplicate = $post->ID; ?> <?php $counter++; ?> <?php if ( get_post_meta($post->ID, 'image', true) ) { ?> <!-- DISPLAYS THE IMAGE URL SPECIFIED IN THE CUSTOM FIELD --> <li <?php if ($counter == 5) { ?>class="last"<?php } ?>><a href="#post-<?php the_ID(); ?>"> <?php woo_image('height=57&width=100&link=img'); ?> </a></li> <?php } else { ?> <!-- DISPLAY THE DEFAULT IMAGE, IF CUSTOM FIELD HAS NOT BEEN COMPLETED --> <li <?php if ($counter == 5) { ?>class="last"<?php } ?>><a href="#post-<?php the_ID(); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/no-img-thumb.jpg" alt=""/></a></li> <?php } ?> <?php endwhile; ?> </ul> </div><!--/featured-th-->
" title="<?php the_title_attribute(); ?> "> <?php } // End If Statement ?> <div class="slide-img"> <?php $has_embed = woo_embed('width=864&key=embed&class=slide-video&id=' . $post->ID); if ($has_embed) { echo $has_embed; // Minus 6px off the width to cater for the 3px border. } else { woo_image('key=image&width=864&h=&class=slide-image&link=img'); } ?> </div> <?php if (isset($slide_url) && $slide_url != '') { ?> </a> <?php } // End If Statement ?> <div class="slide-content"> <h2 class="title">
if ('' == $excerpt) { $excerpt = woo_text_trim(strip_tags(get_the_content()), 12); } ?> <li class="blog-post<?php if ($count == 1) { echo " first"; } if ($count == 3) { echo " last"; $count = 0; } ?> "> <?php woo_image('noheight=true&width=' . $settings['blog_thumb_w'] . '&height=' . $settings['blog_thumb_h']); ?> <h3><a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a></h3> <p><?php echo $excerpt; ?> </p> <p><a class="button small" href="<?php the_permalink(); ?>
function woo_widget_tabs_latest($posts = 5, $size = 45) { global $post; $latest = get_posts('ignore_sticky_posts=1&numberposts=' . $posts . '&orderby=post_date&order=desc'); foreach ($latest as $post) { setup_postdata($post); ?> <li class="fix"> <?php if ($size != 0) { woo_image('height=' . $size . '&width=' . $size . '&class=thumbnail&single=true'); } ?> <a title="<?php the_title(); ?> " href="<?php the_permalink(); ?> "><?php the_title(); ?> </a> <span class="meta"><?php the_time(get_option('date_format')); ?> </span> </li> <?php } nxt_reset_query(); }
the_title(); ?> </h1> <?php woo_post_meta(); ?> </header> <?php echo woo_embed('width=580'); ?> <?php if ($settings['thumb_single'] == 'true' && !woo_embed('')) { woo_image('width=' . $settings['single_w'] . '&height=' . $settings['single_h'] . '&class=thumbnail ' . $settings['thumb_single_align']); } ?> <section class="entry fix"> <?php the_content(); ?> <?php wp_link_pages(array('before' => '<div class="page-link">' . __('Pages:', 'woothemes'), 'after' => '</div>')); ?> </section> <?php the_tags('<p class="tags">', '', '</p>'); ?>
/* If the theme option is set to link to the single portfolio item, adjust the $settings. */ if (isset($woo_options['woo_portfolio_linkto']) && $woo_options['woo_portfolio_linkto'] == 'post') { $settings['large'] = get_permalink($post->ID); $settings['rel'] = ''; } ?> <div <?php post_class($settings['css_classes']); ?> style="max-width: <?php echo intval($thumb_width); ?> px;"> <?php /* Setup image for display and for checks, to avoid doing multiple queries. */ $image = woo_image('return=true&key=portfolio-image&width=' . $thumb_width . '&height=' . $thumb_height . '&link=img&alt=' . the_title_attribute(array('echo' => 0)) . ''); if ($image != '') { ?> <a <?php echo $settings['rel']; ?> title="<?php echo esc_attr($settings['caption']); ?> " href="<?php echo esc_url($settings['large']); ?> " class="thumb"> <?php echo $image; ?>
<div class="col1"> <?php if (have_posts()) : ?> <div id="archivebox"> <h2><em><?php _e('Tag Archive',woothemes); ?> |</em> "<?php single_tag_title("", true); ?>"</h2> </div><!--/archivebox--> <?php while (have_posts()) : the_post(); ?> <div class="post-alt blog" id="post-<?php the_ID(); ?>"> <?php woo_image('height=57&width=100&class=th'); ?> <?php if (function_exists('the_tags')) { ?><h2><?php the_tags('Tags: ', ', ', ''); ?></h2><?php } ?> <h3><a title="<?php _e('Permanent Link to',woothemes); ?> <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3> <p class="posted"><?php _e('Posted on',woothemes); ?> <?php the_time('d F Y'); ?> <?php _e('by',woothemes); ?> <?php the_author(); ?></p> <div class="entry"> <?php the_content('<span class="continue">'.__('Continue Reading',woothemes).'</span>'); ?> </div> <p class="comments"><?php comments_popup_link(__('Comments (0)',woothemes), __('Comments (1)',woothemes), __('Comments (%)',woothemes)); ?></p> </div><!--/post--> <?php endwhile; ?>
query_posts($query_args); if (have_posts()) { $count = 0; while (have_posts()) { the_post(); $count++; ?> <!-- Post Starts --> <div <?php post_class(); ?> > <?php if (wootique_get_woo_option('woo_post_content') != 'content') { woo_image('width=' . wootique_get_woo_option('woo_thumb_w') . '&height=' . wootique_get_woo_option('woo_thumb_h') . '&class=thumbnail ' . wootique_get_woo_option('woo_thumb_align')); } ?> <h2 class="title"><a href="<?php the_permalink(); ?> " rel="bookmark" title="<?php the_title_attribute(); ?> "><?php the_title(); ?> </a></h2> <?php
$page_link_args = apply_filters('woothemes_pagelinks_args', array('before' => '<div class="page-link">' . __('Pages:', 'woothemes'), 'after' => '</div>')); woo_post_before(); ?> <div <?php post_class(); ?> > <?php woo_post_inside_before(); if (isset($woo_options['woo_magazine_f_w']) && ($woo_options['woo_magazine_f_w'] <= 0 || $woo_options['woo_magazine_f_w'] == '') || !isset($woo_options['woo_magazine_f_w'])) { $woo_options['woo_magazine_f_w'] = '100'; } if (isset($woo_options['woo_magazine_f_h']) && $woo_options['woo_magazine_f_h'] <= 0) { $woo_options['woo_magazine_f_h'] = '100'; } woo_image('width=' . $woo_options['woo_magazine_f_w'] . '&height=' . $woo_options['woo_magazine_f_h'] . '&class=thumbnail ' . $woo_options['woo_magazine_f_align']); the_title($title_before, $title_after); woo_post_meta(); ?> <div class="entry"> <?php if (isset($woo_options['woo_magazine_featured_post_content']) && $woo_options['woo_magazine_featured_post_content'] == 'content') { the_content(); } else { the_excerpt(); } ?> </div><!-- /.entry --> <div class="fix"></div> <?php woo_post_inside_after();
function woo_get_image($key = 'image', $width = null, $height = null, $class = "thumbnail", $quality = 90, $id = null, $link = 'src', $repeat = 1, $offset = 0, $before = '', $after = '', $single = false, $force = false, $return = false) { // Run new function woo_image('key=' . $key . '&width=' . $width . '&height=' . $height . '&class=' . $class . '&quality=' . $quality . '&id=' . $id . '&link=' . $link . '&repeat=' . $repeat . '&offset=' . $offset . '&before=' . $before . '&after=' . $after . '&single=' . $single . '&fore=' . $force . '&return=' . $return); return; }
<?php if (have_posts()) { the_post(); the_content(); } ?> <?php query_posts('showposts=60&post_type=post'); ?> <?php if (have_posts()) { while (have_posts()) { the_post(); $wp_query->is_home = false; woo_image('single=true&class=thumbnail alignleft'); } } ?> </section> </article><!-- /.post --> </section><!-- /#main --> <?php get_sidebar(); ?> </div>
$title_before = '<h2 class="title entry-title">'; $title_after = '</h2>'; $title_before = $title_before . '<a href="' . esc_url(get_permalink(get_the_ID())) . '" rel="bookmark" title="' . the_title_attribute(array('echo' => 0)) . '">'; $title_after = '</a>' . $title_after; } $page_link_args = apply_filters('woothemes_pagelinks_args', array('before' => '<div class="page-link">' . __('Pages:', 'woothemes'), 'after' => '</div>')); woo_post_before(); ?> <article <?php post_class(); ?> > <?php woo_post_inside_before(); if ('content' != $settings['post_content'] && !is_singular()) { woo_image('width=' . esc_attr($settings['thumb_w']) . '&height=' . esc_attr($settings['thumb_h']) . '&class=thumbnail ' . esc_attr($settings['thumb_align'])); } ?> <header> <?php the_title($title_before, $title_after); ?> </header> <?php woo_post_meta(); ?> <section class="entry"> <?php the_excerpt(); ?> </section><!-- /.entry -->
$query->the_post(); ?> <article <?php if (has_post_thumbnail()) { echo 'class="has-featured-image"'; } ?> > <?php if (has_post_thumbnail()) { ?> <div class="featured-image"> <?php woo_image('width=500&noheight=true'); ?> </div> <?php } ?> <div class="article-content"> <header> <h1><?php the_title(); ?> </h1> </header>
echo '<a href="' . get_permalink($post_id) . '" title="' . get_the_title() . '">'; woo_image('src="http://st5lte.cloudimage.io/s/resize/534/' . $_image_url . '&key=image&width=534&height=321&link=img"'); echo '</a>' . "\n"; } // End IF Statement } // End IF Statement } else { echo '<a href="' . get_permalink($post_id) . '" title="' . get_the_title() . '">'; woo_image('id=' . $post_id . '&key=image&width=534&height=321&link=img'); echo '</a>' . "\n"; } // End IF Statement } else { echo '<a href="' . get_permalink($post_id) . '" title="' . get_the_title() . '">'; woo_image('id=' . $post_id . '&key=image&width=534&height=321&link=img'); echo '</a>' . "\n"; } // End IF Statement ?> <?php if ($listing_image_caption != '') { ?> <span class="price"><?php if ($custom_field == 'price') { echo $woo_options['woo_listings_currency']; } echo '' . $listing_image_caption; ?> </span><?php }
$_image = array(); $_image = wp_get_attachment_image_src($_id, 'full'); // $_image should have 3 indexes: url, width and height. if (count($_image)) { $_image_url = $_image[0]; woo_image('src=http://st5lte.cloudimage.io/s/resize/296/' . $_image_url . '&key=image&width=296&height=174&link=img'); } // End IF Statement } // End IF Statement } else { woo_image('id=' . $post->ID . '&key=image&width=296&height=174&link=img'); } // End IF Statement } else { woo_image('id=' . $post->ID . '&key=image&width=296&height=174&link=img'); } // End IF Statement } // End IF Statement ?> </a> <?php if ($listing_image_caption != '') { ?>
// Get the other images. $images = woo_get_post_images(0, 'full'); if (count($images) > 0) { $rel = 'lightbox[' . $post->ID . ']'; } // Store featured image ID for exclusion if (isset($woo_options['woo_post_image_support']) && $woo_options['woo_post_image_support'] == 'true' && current_theme_supports('post-thumbnails') && function_exists('get_post_thumbnail_id')) { $featured_image_id = get_post_thumbnail_id($post->ID); } else { $featured_image_id = ''; } if ($featured_image_id != '') { $html .= '<div class="portfolio-item single-portfolio-image ">'; $image_data = wp_get_attachment_image_src($featured_image_id, 'full'); $image_url = $image_data[0]; $html .= '<a href="' . $image_url . '" rel="' . $rel . '">' . woo_image($args) . '</a>' . "\n"; $html .= '</div>'; } if (count($images) > 0) { $html .= '<div class="gallery-wrap">'; foreach ($images as $k => $v) { $pos = false; // Skip if the image is used as the posts featured image if ($featured_image_id == $v['id']) { continue; } if (isset($image_url) && $image_url != '' && $v['url'] != '') { $pos = strpos($v['url'], $image_url); } if ($pos === false || $v['url'] != $image_url) { $html .= '<div class="portfolio-item single-portfolio-image gallery">';
$count = 0; while (have_posts()) { the_post(); $count++; ?> <article <?php post_class('fix'); ?> > <?php echo woo_embed('width=580'); ?> <?php if ($settings['thumb_single'] == 'true' && !woo_embed('')) { woo_image('noheight=true&width=' . $settings['thumb_w'] . '&height=' . $settings['thumb_h'] . '&class=thumbnail ' . $settings['thumb_align']); } ?> <?php woo_post_meta(); ?> <div class="post-body"> <header> <h1><?php the_title(); ?> </h1>
/* Template Name: Image Gallery */ ?> <?php get_header(); ?> <div class="col1"> <div id="archivebox"> <h2><?php the_title(); ?></h2> </div><!--/archivebox--> <div class="imagegallery"> <?php query_posts('showposts=16'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php woo_image('height=170&width=270'); ?> <?php endwhile; endif; ?> </div><!--/imagegallery--> </div><!--/col1--> <?php get_sidebar(); ?> <?php get_footer(); ?>