• Resolved sunnygirl216

    (@sunnygirl216)


    Hello,

    I have installed this plugin and the tab appears on the frontend.
    However, the content of the new tab created is somehow connected to the description tab because they are showing the same content.

    any suggestions on how to fix?

    -AT

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @sunnygirl216,

    I’ve seen this a lot recently so I added a filter to help fix it. But first, are you using a page builder plugin? I’ve only seen this issue related to page builder plugins and I’d like to learn more about which plugins conflict with ours.

    Here is the filter: 'yikes_woo_use_the_content_filter'

    And here is an example of how to use it:

    add_filter( 'yikes_woo_use_the_content_filter', 'yikes_woo_do_not_use_the_content_filter', 10, 1 );
    
    function yikes_woo_do_not_use_the_content_filter( $use_the_content ) {
        return false;
    }

    That should fix half of the issue – you should be able to see your tab’s content now, but things like embedded youtube videos will not work. There’s a second filter we need to add to enable embedded content. Please try to use this filter first and if your content is showing we can do the next one.

    Let me know if you have any questions or need help adding this filter function!
    Kevin.

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hey @sunnygirl216,

    How’s it going? Any luck with the filter? Is the content still duplicated?

    Let me know,
    Kevin.

    Thread Starter sunnygirl216

    (@sunnygirl216)

    Hello! So sorry for answering this so late, it’s been busy with a capital B, I’ll try out your suggestions today

    thank you-AT

    Thread Starter sunnygirl216

    (@sunnygirl216)

    o and yes I do have page builder as a plug in

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hey AT, no problem that it’s been a while. I’ve been real busy over here too.

    Which page builder plugin are you using? It’s just helpful to know for other users down the line.

    Thread Starter sunnygirl216

    (@sunnygirl216)

    Updates:

    The content no longer repeats the description page (yay!)

    However, it is presenting the text as one paragraph versus the way it is written with tabs and sentences starting on new lines.
    Also there is a heading (like most woo commerce tabs) I have removed it from the other tabs but can’t seem to remove it from the custom tab, any recommendations?

    Thread Starter sunnygirl216

    (@sunnygirl216)

    For future users, the page builder in use is Beaver Builder.

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hey, that’s great!

    The formatting issue was expected. Here is another function that fixes all of that and should allow all embed types:

    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;
    
    	// Deal with URLs
    	$embed = new WP_Embed;
    	$content = method_exists( $embed, 'autoembed' ) ? $embed->autoembed( $content ) : $content;
    
    	return $content;
    }
    
    add_filter( 'yikes_woo_filter_main_tab_content', 'yikes_woo_custom_tab_content_filter', 10, 1 );

    In terms of the “header,” do you mean the tab title’s text is repeated in the tab content area? We have another filter for that:

    add_filter( 'yikes_woocommerce_custom_repeatable_product_tabs_heading', 'yikes_woo_remove_product_tab_header', 10, 2 );
    
    function yikes_woo_remove_product_tab_header( $tab_title_html, $tab ) {
    	return '';
    }
    Thread Starter sunnygirl216

    (@sunnygirl216)

    Looks great! Had a parse error but it appears to be a mistake on my end. Thank you for your help and creating this plugin!

    -AT

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    No problem! Glad it’s working.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘content duplication’ is closed to new replies.