Advertisement
Guest User

Output Buffering Fix

a guest
Sep 21st, 2011
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.67 KB | None | 0 0
  1. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  2. <h1><?php the_title(); ?></h1>
  3.  
  4. ob_start();
  5. [tab name='Overview']
  6.     <div id="product-image"><?php the_post_thumbnail(); ?></div>
  7.     <?php the_field('overview'); ?>
  8. [/tab]
  9. [tab name='Features & Benefits']
  10.     <?php the_field('features_&_benefits'); ?>
  11. [/tab]
  12. [tab name='Options & Accessories']
  13.     <?php the_field('options_&_accessories'); ?>
  14. [/tab]
  15. [tab name='Downloads']
  16.     <a href="<?php the_field('downloads'); ?>">Download PDF</a>
  17. [/tab]
  18. [tab name='Supplies']
  19.     <?php the_field('supplies'); ?>
  20. [/tab]
  21. [end_tabset]
  22. $output_buffer = ob_get_contents();
  23. ob_end_clean();
  24. echo do_shortcode( $output_buffer );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement