Advertisement
Guest User

Untitled

a guest
Jul 30th, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. add_shortcode('sedan-tabs','build_sedan_tabs');
  2. function build_sedan_tabs(){
  3. $args1 = array(
  4. 'meta_key' => 'vehicle-type',
  5. 'meta_value' => 'Sedan',
  6. 'posts_per_page' => '4'
  7. );
  8. $query1 = new WP_Query($args1);
  9. while ( $query1->have_posts() ) {
  10. $query1->the_post();
  11. $currentPostID = get_the_id();
  12. $querySedans = '<div class="col-sm-3><div class="display-car"><img src="' . get_post_meta(get_the_id(),'wpcf-vehicle-images', true) . '"/>' .
  13. '<h3>' . get_post_meta($currentPostID,'wpcf-vehicle-year', true) . ' ' .
  14. get_post_meta($currentPostID,'wpcf-vehicle-make', true) . ' ' .
  15. get_post_meta($currentPostID,'wpcf-vehicle-model', true) .'</h3><p>' .
  16. get_post_meta($currentPostID,'wpcf-vehicle-mileage', true) . ' ' .
  17. get_post_meta($currentPostID,'wpcf-vehicle-transmission', true) . '<br /><strong>' .
  18. get_post_meta($currentPostID,'wpcf-vehicle-retail-price', true) . '</strong></p></div></div><a href="' . get_permalink($currentPostID, false) . '"></a>';
  19. return get_the_id();
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement