Shortcode insertion in tab

Sounds like you need to wrap your shortcode contents in ob_start()and return ob_get_clean() require_once(dirname(__FILE__).’/post-type.php’); //file that registers CPT function wporg_shortcodes_init(){ function wporg_shortcode($atts = []) { extract( shortcode_atts( array( ‘term’ => ‘columns’ ), $atts ) ); $custom_taxonomy = $atts[‘term’]; ob_start(); // <- works like magic // add query of custom post type board_members $recentPosts = new … Read more

Move WooCommerce product tabs out of the tabs [closed]

It turned out that woocommerce_get_template() was deprecated and replaced by wc_get_template(). I solved this by adding this to my functions.php. add_action( ‘woocommerce_after_single_product_summary’, ‘removing_product_tabs’, 2 ); function removing_product_tabs(){ remove_action(‘woocommerce_after_single_product_summary’,’woocommerce_output_product_data_tabs’, 10 ); add_action(‘woocommerce_after_single_product_summary’,’get_product_tab_templates_displayed’, 10 ); } function get_product_tab_templates_displayed() { wc_get_template( ‘single-product/tabs/description.php’ ); wc_get_template( ‘single-product/tabs/additional-information.php’ ); comments_template(); }

Disable Jquery UI post tabs

****See edit history for previous comments*** I decided i’m going to write a plugin to do this, the plugin discussed i’m sure was written with the best intentions, but the code in my personal opinion needs a total rewrite, which is essentially what i’ll be doing. The aim will basically be to emulate the functionality … Read more

Google Map iframe in a tab issue

You are using iframe in tab structure.So, 1) When page loads fully, the iframe in itenary tab has display none. so it is not loading the zoomed map properly. 2) When you switch to itenary tab before loading completes, iframe is display block i.e visible so it loads the url/map properly. So for this what … Read more

Preserving tabs and line breaks in when switching from HTML to Visual Editor

Add to function.php add_filter(‘tiny_mce_before_init’, ‘tiny_mce_before_init’); And function tiny_mce_before_init: function tiny_mce_before_init($init) { $init[‘setup’] = “function(ed) { ed.onBeforeSetContent.add(function(ed, o) { if ( o.content.indexOf(‘<pre’) != -1) { o.content = o.content.replace(/<pre[^>]*>[\\s\\S]+?<\\/pre>/g, function(a) { return a.replace(/(\\r\\n|\\n)/g, ‘<br />’); }); } }); }”; return $init; } http://core.trac.wordpress.org/ticket/19666 – it’s known bug, there is workaround but not fix tabs only new line … Read more

Output ‘do_settings_sections()’ as tabs, not one under the other

So because I couldn’t find an out of the box way, I created this. Don’t forget to enqueue the jquery-ui-tabs script – /** Replace the call to ‘do_settings_sections()’ with a call to this function */ function do_settings_sections_tabs($page){ global $wp_settings_sections, $wp_settings_fields; if(!isset($wp_settings_sections[$page])) : return; endif; echo ‘<div id=”abb-tabs”>’; echo ‘<ul>’; foreach((array)$wp_settings_sections[$page] as $section) : if(!isset($section[‘title’])) continue; … Read more

I’m trying to Add a new Buddypress menu tab and it is not showing up [closed]

Make sure that you only attempt to set up the items after BP has set up its core navigation. You can ensure this by hooking to bp_setup_nav with a priority higher than 10. Thus: function bbg_setup_nav() { bp_core_new_subnav_item( array( ‘name’ => ‘Document List’, ‘slug’ => ‘group-document-list’, ‘parent_url’ => $bp->loggedin_user->domain . $bp->groups->slug . “https://wordpress.stackexchange.com/”, ‘parent_slug’ => … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)