-
AuthorPosts
-
February 21, 2019 at 1:37 pm #1069936
Dear Support,
it seems to me that after the last enfold Update the action_woocommerce_after_main_content hook stopped working with showing shortcodes?
I included a shortcode on all product-category pages. Now the shortcode doesn´t show up anymore? I includes a “hello world” for debugging, which is shown correctly. Do you have an idea what could be wrong? I shortened the following shortcode to make it easier to read. I created also a test-environment, to figure it out and gave you an admin access.
Here is the code:// define the woocommerce_after_main_content callback
function action_woocommerce_after_main_content( $woocommerce_output_content_wrapper_end, $int ) {
// make action magic happen here…
if (! is_product() ){
if ( has_term( ‘diamanttrennscheibe-winkelschleifer’, ‘product_cat’ ) ) {
//debug
echo “Hello world!”;
//… Akkordion (shortened)
echo do_shortcode(“[av_section min_height='' min_height_px='500px' padding='default' shadow='no-border-styling' bottom_border='no-border-styling' bottom_border_diagonal_color='#333333' bottom_border_diagonal_direction='' bottom_border_style='' custom_arrow_bg='' id='seotext' color='main_color' background='bg_gradient' custom_bg='rgba(163,197,167,0.61)' background_gradient_color1='#ffffff' background_gradient_color2='rgba(163,197,167,0.61)' background_gradient_direction='vertical' src='' attachment='' attachment_size='' attach='scroll' position='top left' repeat='no-repeat' video='' video_ratio='16:9' overlay_opacity='0.5' overlay_color='' overlay_pattern='' overlay_custom_pattern='' av_element_hidden_in_editor='0' av_uid='av-jl7rodts']
[av_toggle_container initial='1' mode='accordion' sort='' styling='av-minimal-toggle' colors='' font_color='' background_color='#a3c5a7' border_color='' av_uid='av-jl6el8c7']
[av_toggle title='Diamanttrennscheibe für Winkelschleifer aus unserem umfangreichen Produktprogramm' tags='' av_uid='av-33yjyc']“);
};
};
// add the action
add_action( ‘woocommerce_after_main_content’, ‘action_woocommerce_after_main_content’, 10, 2 );//Text nach Produktkategorien anzeigen ENDE
February 24, 2019 at 3:51 pm #1070947Hey dondela,
Looks like the token has expired. Please update it.
Best regards,
VictoriaFebruary 24, 2019 at 6:38 pm #1070995Dear Victoria,
i created a new Admin account.
Thanks for helping :-)February 26, 2019 at 2:59 pm #1071818Hi dondela,
Thank you. Category pages are rendered with the archive.php, I see you have the archive.php in your child theme, you can make all the changes you need in there.
Best regards,
VictoriaFebruary 26, 2019 at 3:13 pm #1071831Hi Victoria,
maybe my problem is not really explained good enough.I included a shortcode on all product-category pages through the functions.php. Now the shortcode doesn´t show up anymore? I included a echo(“hello world”) for debugging, which is shown correctly in this hook: add_action( ‘woocommerce_after_main_content’, ‘action_woocommerce_after_main_content’, 10, 2 );
But the “echo do_shortcode( )” does not work anymore.
This solution worked until the last enfold-update. The “hello world” is shown in the webpage after the products but not the included “enfold shortcodes”
Does this make my problem clearer?
Thanks dondela- This reply was modified 5 years, 9 months ago by dondela. Reason: "echo do_shortcode( )" does not work anymore in the functions.php
March 1, 2019 at 10:49 pm #1073431Hi,
There was an issue the theme that we have fixed which will be included in upcoming version. For the time being, i uploaded beta version of the theme on your installation and that solved the issue. Please review your website :)
Best regards,
YigitMarch 2, 2019 at 10:33 am #1073575Hi Yigit,
awesome, thank you for your great support!
Could you give me this beta-version to update the production live-site as well? The one you fixed was just the test-site. Or would it be possible to just copy the theme-files and override them?
Best regards
dondelaMarch 2, 2019 at 2:39 pm #1073604March 2, 2019 at 7:32 pm #1073706Best support ever.
Thanks Yigit!March 2, 2019 at 10:04 pm #1073730 -
AuthorPosts
- The topic ‘action_woocommerce_after_main_content stopped working’ is closed to new replies.