Hi @oleg_yanchuk,
Can you explain to me what the issue is? I am seeing the <amp-accordion>
HTML on the page and it looks like it’s working. I can’t tell what the problem is.
Let me know.
Thank you,
Kevin.
Hi Kevin!
Thanks for the fast reply.
Yes, amp-accordion is there, but within the amp-accordion the amp-carousel and product price are inserted for the custom tabs. There should not be amp-carousel and prices there.
You can check the last two custom tabs in amp page. They got amp-carousel under accordion. There should not be any amp-carousel and product price there.
AMP page:
https://www.zipsil.ru/conductive-silicone-emi-rfi-shielding-square-profile/amp/?11s
Non amp page:
https://www.zipsil.ru/conductive-silicone-emi-rfi-shielding-square-profile/
Please check the last two custom tabs. They both are custom tabs and they both got the same issue.
Thanks,
Oleg
Hi Oleg,
I think I see the issue – the last two custom tabs are repeating the same content as the product? Is that right?
You don’t have an amp-carousel defined for the tab (on the admin) but that’s what’s showing on the front-end. Is that the problem?
If so, try adding these filter 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 applying these tabs or if I have misunderstood the problem.
Cheers,
Kevin.
Hi @yikesitskevin. I am trying to replicate the error from my side. The theme you are using features a custom AMP reader mode template. While I am checking do you mind letting me know the other plugins you are also using, and did you test with another theme?
Hi @jamesosborne, I think you’re looking for these answers from @oleg_yanchuk, no?
Hi James & Kevin.
James.
1. Yes, I’m using AMP reader mode.
2. Got a lot of plugins installed. I’ll disable them and check it this still an issue.
3. I’ll check the issue with another theme.
Kevin, thanks for the code.
I’ll test your code and let you know.
Oleg
Hi Kevin!
I inserted the code you provided in functions.php.
It worked! Thank you! It’s awesome!
I no longer see the issue.
So, What’s the best solution for it?
Just leaving out the code?
Oleg
Leave the code there – that’s the best solution. Quite a few of our users (who also use page builder plugins) use this snippet.