var $in_contextual = true; /** * Used to initialize the post content. * * @since 0.1 * @access public * @var bool */ var $page_content = false; /** * Constructor * * @since 0.1 * @access public * @param array[string]string */ function __construct($args = array()) {
/** * Create a shortcode to insert content of a page of specified ID * * @param array attributes of shortcode * @return string $output Content of page specified, if no page id specified output = null */ function SPD2012_insertPage($atts, $content = null) { // Default output if no pageid given $output = NULL; // extract atts and assign to array extract(shortcode_atts(array("page" => ''), $atts)); // if a page id is specified, then run query if (!empty($page)) { $pageContent = new WP_query(); $pageContent->query(array('pagename' => $page)); while ($pageContent->have_posts()) { $pageContent->the_post(); // assign the content to $output $output = get_the_content(); } } return $output; }
</section> <?php } ?> <section class="latest-case-study"> <?php // Need to Make This One Dynamic. For now Just Enter in the Case Study Page ID You want to show ?> <span style="background-image: url('/wp-content/uploads/niswonger-banner-small.jpg');"></span> <div class="slide-left"> <header> <h2>Latest Case Study</h2> <?php $query_post = new WP_query(); $query_post->query('post_type=page&page_id=868'); while ($query_post->have_posts()) { $query_post->the_post(); ?> <h3><a href="<?php echo the_permalink(); ?> "><?php echo get_the_title(); ?> </a></h3> <?php $excerpt = get_field('case_study_excerpt'); if (!empty($excerpt)) { ?> <?php
<?php /* Template Name: Case Study Page */ get_header(); ?> <main role="main" role="main"> <section class="the-goods"> <?php $query_post = new WP_query(); $query_post->query('post_type=page&post_parent=18&orderby=menu_order&order=ASC&paged'); while ($query_post->have_posts()) { $query_post->the_post(); ?> <article id="<?php echo $post->post_name; ?> "> <section class="case-study-banner" style="background: url('<?php $image = get_field('case_study_home-page-image'); if (!empty($image)) { echo $image['url']; } ?> ');"> <header> <div> <?php
function mantra_frontpage_generator() { $mantra_options = mantra_get_theme_options(); foreach ($mantra_options as $key => $value) { ${"{$key}"} = $value; } ?> <script type="text/javascript"> // Flash animation for columns jQuery(document).ready(function() { // Slider creation jQuery('#slider').nivoSlider({ effect: '<?php echo $mantra_fpslideranim; ?> ', animSpeed: <?php echo $mantra_fpslidertime; ?> , <?php if ($mantra_fpsliderarrows == "Hidden") { ?> directionNav: false, <?php } if ($mantra_fpsliderarrows == "Always Visible") { ?> directionNav: true, <?php } ?> pauseTime: <?php echo $mantra_fpsliderpause; ?> }); jQuery('#front-columns > div img').hover( function() { jQuery(this) .stop() .animate({opacity: 0.5}, 100) .fadeOut(100) .fadeIn(100) .animate({opacity: 0.999}, 100) ; }, function() {jQuery(this).stop();} ) }); </script> <div id="frontpage"> <?php // First FrontPage Title if ($mantra_fronttext1) { ?> <div id="front-text1"> <h1><?php echo esc_attr($mantra_fronttext1); ?> </h1></div><?php } // When a post query has been selected from the Slider type in the admin area if ($mantra_slideType != 'Custom Slides') { global $post; // Initiating query $custom_query = new WP_query(); // Switch for Query type switch ($mantra_slideType) { case 'Latest Posts': $custom_query->query('showposts=' . $mantra_slideNumber . '&ignore_sticky_posts=1'); break; case 'Random Posts': $custom_query->query('showposts=' . $mantra_slideNumber . '&orderby=rand&ignore_sticky_posts=1'); break; case 'Latest Posts from Category': $custom_query->query('showposts=' . $mantra_slideNumber . '&category_name=' . $mantra_slideCateg . '&ignore_sticky_posts=1'); break; case 'Random Posts from Category': $custom_query->query('showposts=' . $mantra_slideNumber . '&category_name=' . $mantra_slideCateg . '&orderby=rand&ignore_sticky_posts=1'); break; case 'Sticky Posts': $custom_query->query(array('post__in' => get_option('sticky_posts'), 'showposts' => $mantra_slideNumber, 'ignore_sticky_posts' => 1)); break; case 'Specific Posts': // Transofm string separated by commas into array $pieces_array = explode(",", $mantra_slideSpecific); $custom_query->query(array('post_type' => 'any', 'showposts' => -1, 'post__in' => $pieces_array, 'ignore_sticky_posts' => 1, 'orderby' => 'post__in')); break; } // Variables i and j for matching slider number with caption number $i = 0; $j = 0; ?> <div class="slider-wrapper theme-default"> <div class="ribbon"></div> <div id="slider" class="nivoSlider <?php if ($mantra_fpsliderarrows == "Visible on Hover") { ?> slider-navhover<?php } ?> "> <?php // Loop for creating the slides if ($custom_query->have_posts()) { while ($custom_query->have_posts()) { $custom_query->the_post(); $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'slider'); $i++; ?> <a href="<?php the_permalink(); ?> "><img src="<?php echo $image[0]; ?> " alt="" title="#caption<?php echo $i; ?> " /></a> <?php } } // end of the loop. ?> </div> <?php // Loop for creating the captions if ($custom_query->have_posts()) { while ($custom_query->have_posts()) { $custom_query->the_post(); $j++; ?> <div id="caption<?php echo $j; ?> " class="nivo-html-caption"> <?php the_title("<h2>", "</h2>"); the_excerpt(); ?> </div> <?php } } // end of the loop. ?> </div> <?php } else { // If Custom Slides have been selected ?> <div class="slider-wrapper theme-default"> <div class="ribbon"></div> <div id="slider" class="nivoSlider <?php if ($mantra_fpsliderarrows == "Visible on Hover") { ?> slider-navhover<?php } ?> "> <?php for ($i = 1; $i <= 5; $i++) { if (${"mantra_sliderimg{$i}"}) { ?> <a href='<?php echo esc_url(${"mantra_sliderlink{$i}"}); ?> '><img src='<?php echo esc_url(${"mantra_sliderimg{$i}"}); ?> ' alt="" <?php if (${"mantra_slidertitle{$i}"} || ${"mantra_slidertext{$i}"}) { ?> title="#caption<?php echo $i; ?> " <?php } ?> /></a><?php } } ?> </div> <?php for ($i = 1; $i <= 5; $i++) { ?> <div id="caption<?php echo $i; ?> " class="nivo-html-caption"> <?php echo '<h2>' . ${"mantra_slidertitle{$i}"} . '</h2>' . ${"mantra_slidertext{$i}"}; ?> </div> <?php } ?> </div> <?php } // Second FrontPage title if ($mantra_fronttext2) { ?> <div id="front-text2"> <h1><?php echo esc_attr($mantra_fronttext2); ?> </h1></div><?php } // Frontpage columns if ($mantra_nrcolumns) { ?> <div id="front-columns"> <div id="column1"> <a href="<?php echo esc_url($mantra_columnlink1); ?> "> <div class="column-image" ><img src="<?php echo esc_url($mantra_columnimg1); ?> " id="columnImage1" alt="" /> </div> <h3><?php echo $mantra_columntitle1; ?> </h3> </a><div class="column-text"><?php echo do_shortcode($mantra_columntext1); ?> </div> <?php if ($mantra_columnreadmore) { ?> <div class="columnmore"> <a href="<?php echo esc_url($mantra_columnlink1); ?> "><?php echo esc_attr($mantra_columnreadmore); ?> »</a> </div><?php } ?> </div> <?php if ($mantra_nrcolumns != '1') { ?> <div id="column2"> <a href="<?php echo esc_url($mantra_columnlink2); ?> "> <div class="column-image" ><img src="<?php echo esc_url($mantra_columnimg2); ?> " id="columnImage2" alt="" /> </div> <h3><?php echo $mantra_columntitle2; ?> </h3> </a><div class="column-text"><?php echo do_shortcode($mantra_columntext2); ?> </div> <?php if ($mantra_columnreadmore) { ?> <div class="columnmore"> <a href="<?php echo esc_url($mantra_columnlink2); ?> "><?php echo esc_attr($mantra_columnreadmore); ?> »</a> </div><?php } ?> </div> <?php if ($mantra_nrcolumns != '2') { ?> <div id="column3"> <a href="<?php echo esc_url($mantra_columnlink3); ?> "> <div class="column-image" ><img src="<?php echo esc_url($mantra_columnimg3); ?> " id="columnImage3" alt="" /> </div> <h3><?php echo $mantra_columntitle3; ?> </h3> </a><div class="column-text"><?php echo do_shortcode($mantra_columntext3); ?> </div> <?php if ($mantra_columnreadmore) { ?> <div class="columnmore"> <a href="<?php echo esc_url($mantra_columnlink3); ?> "><?php echo esc_attr($mantra_columnreadmore); ?> »</a> </div><?php } ?> </div> <?php if ($mantra_nrcolumns == '4') { ?> <div id="column4"> <a href="<?php echo esc_url($mantra_columnlink4); ?> "> <div class="column-image" ><img src="<?php echo esc_url($mantra_columnimg4); ?> " id="columnImage4" alt="" /> </div> <h3><?php echo $mantra_columntitle4; ?> </h3> </a><div class="column-text"><?php echo do_shortcode($mantra_columntext4); ?> </div> <?php if ($mantra_columnreadmore) { ?> <div class="columnmore"> <a href="<?php echo esc_url($mantra_columnlink4); ?> "><?php echo esc_attr($mantra_columnreadmore); ?> »</a> </div><?php } ?> </div> <?php } } } ?> </div> <?php } // Frontpage text areas if ($mantra_fronttext3) { ?> <div id="front-text3"> <blockquote><?php echo do_shortcode($mantra_fronttext3); ?> </blockquote></div><?php } if ($mantra_fronttext4) { ?> <div id="front-text4"> <blockquote><?php echo do_shortcode($mantra_fronttext4); ?> </blockquote></div><?php } ?> </div> <!-- frontpage --> <?php }
function widget($args, $instance) { extract($args); $query_args = array('posts_per_page' => $instance['number_of_posts'], 'post__not_in' => array($post->ID)); $recent_posts = new WP_query(); $recent_posts->query($query_args); $title = apply_filters('widget_title', $instance['title']); echo $before_widget . $before_title . $title . $after_title; echo '<ol id="raw_recent_posts">'; if ($recent_posts->have_posts()) { while ($recent_posts->have_posts()) { $recent_posts->the_post(); ?> <li> <a href="<?php the_permalink(); ?> "><?php the_post_thumbnail('55x55'); ?> </a> <h5><a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a></h5> <em><?php the_time(get_option('date_format')); ?> </em> </li> <?php } } else { echo '<li><h6>' . _e("No recent posts.", "raw_theme") . '</h6></li>'; } echo '</ol>'; echo $after_widget; }
<?php get_header(); ?> <div id="post"> <ul> <?php $q = new WP_query(); $q->query("post_type=question&post_status=publish&posts_per_page=20"); if (have_posts()) { while ($q->have_posts()) { $q->the_post(); $s = new questionSubmit(); ?> <li id="n2-<?php the_ID(); ?> " class="user_id_<?php the_author_ID(); ?> "> <a href="<?php the_permalink(); ?> " title="<?php the_title(); ?> "><?php the_title(); ?>
echo do_shortcode($nirvana_fronttext3); ?> </div><?php } ?> </div><?php } //COLUMNS // Initiating query $custom_query2 = new WP_query(); $columns = array(); if ($nirvana_columnNumber > 0) { // Switch for Query type switch ($nirvana_columnType) { case 'Latest Posts': $custom_query2->query('showposts=' . $nirvana_columnNumber . '&ignore_sticky_posts=1'); break; case 'Random Posts': $custom_query2->query('showposts=' . $nirvana_columnNumber . '&orderby=rand&ignore_sticky_posts=1'); break; case 'Latest Posts from Category': $custom_query2->query('showposts=' . $nirvana_columnNumber . '&category_name=' . $nirvana_columnCateg . '&ignore_sticky_posts=1'); break; case 'Random Posts from Category': $custom_query2->query('showposts=' . $nirvana_columnNumber . '&category_name=' . $nirvana_columnCateg . '&orderby=rand&ignore_sticky_posts=1'); break; case 'Sticky Posts': $custom_query2->query(array('post__in' => get_option('sticky_posts'), 'showposts' => $nirvana_columnNumber, 'ignore_sticky_posts' => 1)); break; case 'Specific Posts': // Transofm string separated by commas into array
<?php if (is_page('sites')) { ?> <?php $q = new WP_query(); $q->query('post_type=site'); if ($q->have_posts()) { while ($q->have_posts()) { $q->the_post(); $s = new TypeSites(); $a = $s->mshot(250); ?> <div id="site-<?php the_ID(); ?> " class="sites clearfix user_id_<?php the_author_ID(); ?> "> <div class="site-thumbnail"> <a href="<?php the_permalink(); ?> " title="<?php the_title(); ?> "> <?php
?> <div id="front-text1"> <h1><?php echo esc_attr($parabola_fronttext1); ?> </h1></div><?php } // When a post query has been selected from the Slider type in the admin area global $post; // Initiating query $custom_query = new WP_query(); $slides = array(); if ($parabola_slideNumber > 0) { // Switch for Query type switch ($parabola_slideType) { case 'Latest Posts': $custom_query->query('showposts=' . $parabola_slideNumber . '&ignore_sticky_posts=1'); break; case 'Random Posts': $custom_query->query('showposts=' . $parabola_slideNumber . '&orderby=rand&ignore_sticky_posts=1'); break; case 'Latest Posts from Category': $custom_query->query('showposts=' . $parabola_slideNumber . '&category_name=' . $parabola_slideCateg . '&ignore_sticky_posts=1'); break; case 'Random Posts from Category': $custom_query->query('showposts=' . $parabola_slideNumber . '&category_name=' . $parabola_slideCateg . '&orderby=rand&ignore_sticky_posts=1'); break; case 'Sticky Posts': $custom_query->query(array('post__in' => get_option('sticky_posts'), 'showposts' => $parabola_slideNumber, 'ignore_sticky_posts' => 1)); break; case 'Specific Posts': // Transofm string separated by commas into array
<?php get_header(); ?> <div class="navigation"><p><?php posts_nav_link(); ?> </p></div> <div class="gallery-thumbs"> <ul> <?php $q = new WP_query(); $q->query("post_type=site&post_status=publish&posts_per_page=9"); if (have_posts()) { /*$previous_user_id = 0; $previous_user_id = */ while ($q->have_posts()) { $q->the_post(); $s = new siteSubmit(); // var_dump($s->mshot('200')); // die; ?> <li id="n2-<?php the_ID(); ?> " class="user_id_<?php the_author_ID(); ?> "> <a href="<?php the_permalink();
<?php get_header(); ?> <div id="post"> <ul> <?php $q = new WP_query(); $q->query("post_type=snip&post_status=publish&posts_per_page=20"); if (have_posts()) { while ($q->have_posts()) { $q->the_post(); $s = new snipSubmit(); ?> <li id="n2-<?php the_ID(); ?> " class="user_id_<?php the_author_ID(); ?> "> <a href="<?php the_permalink(); ?> " title="<?php the_title(); ?> "><?php the_title(); ?>
<ul class="row list-my-products"> <?php $top_cats = new WP_query(); $top_cats->query('showposts=6&cat=6'); ?> <?php if (have_posts()) { ?> <?php while ($top_cats->have_posts()) { $top_cats->the_post(); ?> <li class="col-sm-4 col-xs-6 item"> <div class="inner"> <!-- post thumbnail --> <?php if (has_post_thumbnail()) { // Check if thumbnail exists ?> <a href="<?php the_permalink(); ?> " title="<?php the_title(); ?> "> <!-- post thumbnail --> <?php if (has_post_thumbnail()) {
static function handle_shortcode($atts) { self::$add_script = true; extract(shortcode_atts(array('class' => false, 'page' => get_the_ID()), $atts, 'content')); ob_start(); // Default output if no pageid given $output = NULL; // extract atts and assign to array // if a page id is specified, then run query if (!empty($page)) { $pageContent = new WP_query(); $pageContent->query(array('page_id' => $page, 'post_type' => array('page', 'ai1ec_event'))); while ($pageContent->have_posts()) { $pageContent->the_post(); // assign the content to $output the_content(); } wp_reset_query(); } ?> <?php $content = ob_get_clean(); return $content; }
<div class="section-heading mgB20"> <h3 class="section-title text-left">Tin tức Của chúng tôi</h3> </div> <ul class="list-news"> <?php $top_cats = new WP_query(); $top_cats->query('showposts=3&cat=7'); ?> <?php if (have_posts()) { ?> <?php while ($top_cats->have_posts()) { $top_cats->the_post(); ?> <li> <div class="media"> <div class="pull-left"> <a href="<?php the_permalink(); ?> "> <?php if (has_post_thumbnail()) { // Check if thumbnail exists echo get_the_post_thumbnail($post_id, 'thumbnail', array('class' => 'img-responsive w80')); } ?> </a>
if ($iced_mocha_fronttext3) { ?> <div id="front-text3"> <blockquote><?php echo do_shortcode($iced_mocha_fronttext3); ?> </blockquote></div><?php } //COLUMNS // Initiating query $custom_query2 = new WP_query(); $columns = array(); if ($iced_mocha_columnNumber > 0 || $iced_mocha_columnNumberEvents > 0) { // Switch for Query type switch ($iced_mocha_columnType) { case 'Latest Events': $custom_query2->query('post_type=espresso_events&showposts=' . $iced_mocha_columnNumberEvents); break; case 'Random Events': $custom_query2->query('post_type=espresso_events&showposts=' . $iced_mocha_columnNumberEvents . '&orderby=rand'); break; case 'Latest Posts': $custom_query2->query('showposts=' . $iced_mocha_columnNumber . '&ignore_sticky_posts=1'); break; case 'Random Posts': $custom_query2->query('showposts=' . $iced_mocha_columnNumber . '&orderby=rand&ignore_sticky_posts=1'); break; case 'Latest Posts from Category': $custom_query2->query('showposts=' . $iced_mocha_columnNumber . '&category_name=' . $iced_mocha_columnCateg . '&ignore_sticky_posts=1'); break; case 'Random Posts from Category': $custom_query2->query('showposts=' . $iced_mocha_columnNumber . '&category_name=' . $iced_mocha_columnCateg . '&orderby=rand&ignore_sticky_posts=1');
<section> <div class="entry_header_no_padding"> <h1 class="page_title"><?php $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy')); echo $term->name; ?> </h1> </div> <div class="entry"> <!--BEGIN #content --> <section class="row" id="container" > <ul class="add-top ch-grid entry"> <?php $args = array('post_type' => 'portfolio', 'order' => 'ASC', 'posts_per_page' => -1, 'tax_query' => array(array('taxonomy' => 'skill-type', 'field' => 'slug', 'terms' => $term->name))); $the_query = new WP_query(); $the_query->query($args); if ($the_query->have_posts()) { while ($the_query->have_posts()) { $the_query->the_post(); $terms = get_the_terms(get_the_ID(), 'skill-type'); unset($img); if (current_theme_supports('post-thumbnails') && has_post_thumbnail()) { $slider_img_URL = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), ''); $img = $slider_img_URL[0]; $full_image_url = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full'); } ?> <li class="<?php foreach ($terms as $term) { echo strtolower(preg_replace('/\\s+/', '-', $term->name)) . ' '; }
function mantra_frontpage_generator() { $mantra_options = mantra_get_theme_options(); foreach ($mantra_options as $key => $value) { ${"{$key}"} = $value; } ?> <script type="text/javascript"> // Flash animation for columns jQuery(window).load(function() { // Slider creation jQuery('#slider').nivoSlider({ effect: '<?php echo $mantra_fpslideranim; ?> ', animSpeed: <?php echo $mantra_fpslidertime; ?> , <?php if ($mantra_fpsliderarrows == "Hidden") { ?> directionNav: false, <?php } if ($mantra_fpsliderarrows == "Always Visible") { ?> directionNavHide: false, <?php } ?> pauseTime: <?php echo $mantra_fpsliderpause; ?> }); jQuery('#front-columns > div img').hover( function() { jQuery(this) .stop() .animate({opacity: 0.5}, 100) .fadeOut(100) .fadeIn(100) .animate({opacity: 1}, 100) ; }, function() {jQuery(this).stop();} ) }); </script> <style> <?php if ($mantra_fronthideheader) { ?> #branding {display:none;} <?php } if ($mantra_fronthidemenu) { ?> #access {display:none;} <?php } if ($mantra_fronthidewidget) { ?> #colophon {display:none;} <?php } if ($mantra_fronthidefooter) { ?> #footer2 {display:none;} <?php } if ($mantra_fronthideback) { ?> #main {background:none;} <?php } ?> .slider-wrapper { display:block; float:none; width:100%; margin:0 auto; } #slider{ max-width:<?php echo $mantra_fpsliderwidth; ?> px ; height:<?php echo $mantra_fpsliderheight; ?> px ; margin:30px auto 0; display:block; float:none; border:<?php echo $mantra_fpsliderborderwidth . 'px solid ' . $mantra_fpsliderbordercolor; ?> ; } #front-text1 h1 , #front-text2 h1{ display:block; float:none; margin:30px auto; text-align:center; font-size:32px; clear:both; line-height:32px; font-style:italic; font-weight:bold; color:<?php echo $mantra_fronttitlecolor; ?> ; } #front-text2 h1{ font-size:28px; line-height:28px; margin-top:0px; margin-bottom:25px; } #frontpage blockquote { width:88% ; max-width:88% !important; margin-bottom:20px; font-size:16px; line-height:22px; color:#444; } #frontpage #front-text4 blockquote { font-size:14px; line-height:18px; color:#666; } #frontpage blockquote:before, #frontpage blockquote:after { content:none; } #front-columns > div { display:block; width:<?php switch ($mantra_nrcolumns) { case 0: break; case 1: echo "95"; break; case 2: echo "45"; break; case 3: echo "29"; break; case 4: echo "21"; break; } ?> %; height:auto; margin-left:2%;margin-right:2%; margin-bottom:10px; float:left; } .column-image { height:<?php echo $mantra_colimageheight; ?> px; border:3px solid #eee; } .theme-default .nivo-controlNav {margin-left:0;} <?php if ($mantra_fpslidernav != "Bullets") { if ($mantra_fpslidernav == "Numbers") { ?> .theme-default .nivo-controlNav {bottom:-40px;} .theme-default .nivo-controlNav a { background: none; text-decoration:underline; text-indent:0; } <?php } else { if ($mantra_fpslidernav == "None") { ?> .theme-default .nivo-controlNav {display:none;} <?php } } } ?> </style> <div id="frontpage"> <?php // First FrontPage Title if ($mantra_fronttext1) { ?> <div id="front-text1"> <h1><?php echo esc_attr($mantra_fronttext1); ?> </h1></div><?php } // When a post query has been selected from the Slider type in the admin area if ($mantra_slideType != 'Custom Slides') { global $post; // Initiating query $custom_query = new WP_query(); // Switch for Query type switch ($mantra_slideType) { case 'Latest Posts': $custom_query->query('showposts=' . $mantra_slideNumber . '&ignore_sticky_posts=1'); break; case 'Random Posts': $custom_query->query('showposts=' . $mantra_slideNumber . '&orderby=rand&ignore_sticky_posts=1'); break; case 'Latest Posts from Category': $custom_query->query('showposts=' . $mantra_slideNumber . '&category_name=' . $mantra_slideCateg . '&ignore_sticky_posts=1'); break; case 'Random Posts from Category': $custom_query->query('showposts=' . $mantra_slideNumber . '&category_name=' . $mantra_slideCateg . '&orderby=rand&ignore_sticky_posts=1'); break; case 'Sticky Posts': $custom_query->query(array('post__in' => get_option('sticky_posts'), 'showposts' => $mantra_slideNumber, 'ignore_sticky_posts' => 1)); break; case 'Specific Posts': // Transofm string separated by commas into array $pieces_array = explode(",", $mantra_slideSpecific); $custom_query->query(array('post_type' => 'any', 'post__in' => $pieces_array, 'ignore_sticky_posts' => 1)); break; } // Variables i and j for matching slider number with caption number $i = 0; $j = 0; ?> <div class="slider-wrapper theme-default"> <div class="ribbon"></div> <div id="slider" class="nivoSlider"> <?php // Loop for creating the slides if ($custom_query->have_posts()) { while ($custom_query->have_posts()) { $custom_query->the_post(); $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full'); $i++; ?> <a href="<?php the_permalink(); ?> "><img src="<?php echo $image[0]; ?> " alt="" title="#caption<?php echo $i; ?> " /></a> <?php } } // end of the loop. ?> </div> <?php // Loop for creating the captions if ($custom_query->have_posts()) { while ($custom_query->have_posts()) { $custom_query->the_post(); $j++; ?> <div id="caption<?php echo $j; ?> " class="nivo-html-caption"> <?php the_title("<h2>", "</h2>"); the_excerpt(); ?> </div> <?php } } // end of the loop. ?> </div> <?php } else { // If Custom Slides have been selected ?> <div class="slider-wrapper theme-default"> <div class="ribbon"></div> <div id="slider" class="nivoSlider"> <?php for ($i = 1; $i <= 5; $i++) { if (${"mantra_sliderimg{$i}"}) { ?> <a href='<?php echo esc_url(${"mantra_sliderlink{$i}"}); ?> '><img src='<?php echo esc_url(${"mantra_sliderimg{$i}"}); ?> ' alt="" <?php if (${"mantra_slidertitle{$i}"} || ${"mantra_slidertext{$i}"}) { ?> title="#caption<?php echo $i; ?> " <?php } ?> /></a><?php } } ?> </div> <?php for ($i = 1; $i <= 5; $i++) { ?> <div id="caption<?php echo $i; ?> " class="nivo-html-caption"> <?php echo '<h2>' . ${"mantra_slidertitle{$i}"} . '</h2>' . ${"mantra_slidertext{$i}"}; ?> </div> <?php } ?> </div> <?php } // Second FrontPage title if ($mantra_fronttext2) { ?> <div id="front-text2"> <h1><?php echo esc_attr($mantra_fronttext2); ?> </h1></div><?php } // Frontpage columns if ($mantra_nrcolumns) { ?> <div id="front-columns"> <div id="column1"> <a href="<?php echo esc_url($mantra_columnlink1); ?> "> <div class="column-image" ><img src="<?php echo esc_url($mantra_columnimg1); ?> " id="columnImage1" alt="" /> </div> <h3><?php echo $mantra_columntitle1; ?> </h3> </a><div class="column-text"><?php echo $mantra_columntext1; ?> </div> <?php if ($mantra_columnreadmore) { ?> <div class="columnmore"> <a href="<?php echo esc_url($mantra_columnlink1); ?> "><?php echo esc_attr($mantra_columnreadmore); ?> »</a> </div><?php } ?> </div> <?php if ($mantra_nrcolumns != '1') { ?> <div id="column2"> <a href="<?php echo esc_url($mantra_columnlink2); ?> "> <div class="column-image" ><img src="<?php echo esc_url($mantra_columnimg2); ?> " id="columnImage2" alt="" /> </div> <h3><?php echo $mantra_columntitle2; ?> </h3> </a><div class="column-text"><?php echo $mantra_columntext2; ?> </div> <?php if ($mantra_columnreadmore) { ?> <div class="columnmore"> <a href="<?php echo esc_url($mantra_columnlink2); ?> "><?php echo esc_attr($mantra_columnreadmore); ?> »</a> </div><?php } ?> </div> <?php if ($mantra_nrcolumns != '2') { ?> <div id="column3"> <a href="<?php echo esc_url($mantra_columnlink3); ?> "> <div class="column-image" ><img src="<?php echo esc_url($mantra_columnimg3); ?> " id="columnImage3" alt="" /> </div> <h3><?php echo $mantra_columntitle3; ?> </h3> </a><div class="column-text"><?php echo $mantra_columntext3; ?> </div> <?php if ($mantra_columnreadmore) { ?> <div class="columnmore"> <a href="<?php echo esc_url($mantra_columnlink3); ?> "><?php echo esc_attr($mantra_columnreadmore); ?> »</a> </div><?php } ?> </div> <?php if ($mantra_nrcolumns == '4') { ?> <div id="column4"> <a href="<?php echo esc_url($mantra_columnlink4); ?> "> <div class="column-image" ><img src="<?php echo esc_url($mantra_columnimg4); ?> " id="columnImage4" alt="" /> </div> <h3><?php echo $mantra_columntitle4; ?> </h3> </a><div class="column-text"><?php echo $mantra_columntext4; ?> </div> <?php if ($mantra_columnreadmore) { ?> <div class="columnmore"> <a href="<?php echo esc_url($mantra_columnlink4); ?> "><?php echo esc_attr($mantra_columnreadmore); ?> »</a> </div><?php } ?> </div> <?php } } } ?> </div> <?php } // Frontpage text areas if ($mantra_fronttext3) { ?> <div id="front-text3"> <blockquote><?php echo $mantra_fronttext3; ?> </blockquote></div><?php } if ($mantra_fronttext4) { ?> <div id="front-text4"> <blockquote><?php echo $mantra_fronttext4; ?> </blockquote></div><?php } ?> </div> <!-- frontpage --> <?php }
echo $image['url']; ?> ');"></span> <?php } ?> <?php } wp_reset_postdata(); ?> <div class="slide-right"> <header> <h2>Latest Case Study</h2> <?php $query_post = new WP_query(); $query_post->query('post_type=page&page_id=34'); while ($query_post->have_posts()) { $query_post->the_post(); ?> <h3><a href="<?php echo the_permalink(); ?> "><?php echo get_the_title(); ?> </a></h3> <?php $excerpt = get_field('case_study_excerpt'); if (!empty($excerpt)) { ?> <?php
/* Template Name: Work */ get_header(); ?> <?php if (have_posts()) { while (have_posts()) { the_post(); ?> <main role="main" role="main" class="projects-container"> <?php $query_post = new WP_query(); $query_post->query('post_type=page&post_parent=489&nopaging=true&order=ASC&order_by=menu_order'); while ($query_post->have_posts()) { $query_post->the_post(); ?> <?php } wp_reset_postdata(); ?> </main> <?php } } ?>