• Resolved F C

    (@pmagony)


    If you go to the link provided and click on any of the secondary tabs after the description tab, you’ll notice that the content column is missing.

    • This topic was modified 6 years ago by F C.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter F C

    (@pmagony)

    I had some code commented out (<!–) in the main description that caused the tabs to break.

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @pmagony,

    The HTML markup in your tabs is extremely weird. All of the custom tab content is actually within the Description tab (but it’s all hidden). When you try to view a custom tab, the tab content is displayed but then it’s hidden again because the description tab is [rightfully] hidden. So all of the custom tab content is hidden because it’s in the description tab!

    I know that’s probably confusing.

    There are a few things to check.

    First, make sure you don’t have any unnecessary markup with your tabs. Go to the “Text” editor for your description and custom tabs and make sure there aren’t additional <div>‘s that you don’t recognize. This can happen when content is copy and pasted.

    Second, this may be an issue with the way the theme serves up the Description. You can try to fix this by adding the following functions:

    add_filter( 'yikes_woo_use_the_content_filter', '__return_false' );
    
    add_filter( 'yikes_woo_filter_main_tab_content', 'yikes_woo_custom_tab_content_filter', 10, 1 );
    
    function yikes_woo_custom_tab_content_filter( $content ) {
    
    	$content = function_exists( 'capital_P_dangit' ) ? capital_P_dangit( $content ) : $content;
    	$content = function_exists( 'wptexturize' ) ? wptexturize( $content ) : $content;
    	$content = function_exists( 'convert_smilies' ) ? convert_smilies( $content ) : $content;
    	$content = function_exists( 'wpautop' ) ? wpautop( $content ) : $content;
    	$content = function_exists( 'shortcode_unautop' ) ? shortcode_unautop( $content ) : $content;
    	$content = function_exists( 'prepend_attachment' ) ? prepend_attachment( $content ) : $content;
    	$content = function_exists( 'wp_make_content_images_responsive' ) ? wp_make_content_images_responsive( $content ) : $content;
    	$content = function_exists( 'do_shortcode' ) ? do_shortcode( $content ) : $content;
    
    	if ( class_exists( 'WP_Embed' ) ) {
    
    		// Deal with URLs
    		$embed = new WP_Embed;
    		$content = method_exists( $embed, 'autoembed' ) ? $embed->autoembed( $content ) : $content;
    	}	
    
    	return $content;
    }

    (Let me know if you need help adding this code to your website!).

    Third, you might want to check your theme’s tab settings. Sometimes a theme has some custom tab settings that affect our plugin. Make sure your familiar with your theme’s tab settings and make sure there isn’t anything obviously wrong there.

    Cheers,
    Kevin.

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Haha, looks like you solved it while I was responding. Cheers!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Tab Content Disappears after Clicking Custom Tab’ is closed to new replies.