• Resolved josueduarte

    (@josueduarte)


    Hello.
    I’m trying to get rid of the weglot css on my amp pages. I already unchecked the “Translate Amp pages” and created a Regex to exclude the amp pages from translation, but I still have the css code on those pages.

    How can I exclude the weglot css from the amp pages?

    Thank you,

    Josué Duarte

Viewing 1 replies (of 1 total)
  • Plugin Contributor Julien MA Jacob

    (@wpr0ck)

    Hello @josueduarte,

    You are right, thank you for this return. We will fix this in the next release of Weglot plugin. To resolve this before, you can edit this file weglot/src/third/amp/class-amp-enqueue-weglot.php and add this code :

    `
    if ( empty( $this->option_services->get_option( ‘translate_amp’ ) ) ) {
    return;
    }
    `

    At the line 36, before this code :

    `
    add_action( ‘amp_post_template_css’, [ $this, ‘weglot_amp_post_template_css’ ] );
    `

    You can find this change here : https://github.com/weglot/translate-wordpress/commit/8fe19d29b61941a655caa3d838262a58541b2b63

    Please let me know if that solve your problem,
    Best regards

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.