'' ), $atts)); global $post; $args = array('post_type' => 'rtbs_tabs', 'name' => $name); $custom_posts = get_posts($args); $output = ''; foreach($custom_posts as $post) : setup_postdata($post); $entries = get_post_meta( $post->ID, '_rtbs_tabs_head', true ); $options = get_post_meta( $post->ID, '_rtbs_settings_head', true ); (get_post_meta( $post->ID, '_rtbs_tbg', true )) ? $rtbs_tbg = get_post_meta( $post->ID, '_rtbs_tbg', true ) : $rtbs_tbg = 'transparent'; /* Checks if forcing original fonts. */ $original_font = get_post_meta( $post->ID, '_rtbs_original_font', true ); ($original_font && $original_font != 'no' ? $ori_f = 'rtbs_tab_ori' : $ori_f = ''); $rtbs_breakpoint = get_post_meta( $post->ID, '_rtbs_breakpoint', true ); $rtbs_color = get_post_meta( $post->ID, '_rtbs_tabs_bg_color', true ); /* Outputing the options in invisible divs */ $output = '
'; $output .= ''; $output .= ''; $output .= ''; $output .= ''; $output .= '
'; foreach ($entries as $key => $tabs) { if ($key == 0){ $output .= '
'; $output .= do_shortcode(wpautop($tabs['_rtbs_content'])); $output .= '
'; } else { $output .= '
'; $output .= do_shortcode(wpautop($tabs['_rtbs_content'])); $output .= '
'; } } $output .= '
'; endforeach; wp_reset_postdata(); return $output; } add_shortcode("rtbs", "rtbs_sc"); ?>