Want more features on Pastebin? Sign Up, it's FREE!
Guest

Output Buffering Fix

By: a guest on Sep 21st, 2011  |  syntax: PHP  |  size: 0.67 KB  |  views: 85  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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 );
clone this paste RAW Paste Data