• Resolved cutu234

    (@cutu234)


    I’ve just found that the overlay CSS load on each and every page:

    <style id="nelio-ab-testing-overlay" type="text/css">@keyframes nelio-ab-testing-overlay{to{width:0;height:0}}body:not(.nab-done)::before,body:not(.nab-done)::after{animation:1ms 3000ms linear nelio-ab-testing-overlay forwards!important;background:#fff!important;display:block!important;content:""!important;position:fixed!important;top:0!important;left:0!important;width:100vw;height:120vh;pointer-events:none!important;z-index:999999998!important}html.nab-redirecting body::before,html.nab-redirecting body::after{animation:none!important}</style>

    This affects all pages, right? Is it possible to restrict this to the page that we are actually testing?`

    Thank you! Mike

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author David Aguilera

    (@davilera)

    It applies to all pages when we can’t determine beforehand if the current page is under test or not.

    Thread Starter cutu234

    (@cutu234)

    `Well, I could do that! 🙂 Just to make sure I understand correctly: Right now, we’re testing two versions of a category page. It’s exactly this one page where the overlay is used. Could I disable the default Nelio CSS and load it conditionally? Or would that interfere with the test in any way? Maybe it’s not even worth the effort. But you know: Customers are constantly sending AI reports with suggestions for “improvements.” Sometimes the AI has valid points.

    Plugin Author David Aguilera

    (@davilera)

    Yeah, I guess we could be a little bit more sophisticated when it comes to enqueuing this stuff… Let me review the code and I’ll let you know if we can do it.

    Thread Starter cutu234

    (@cutu234)

    Well, I would use a standard snippet for the category page like so:

    add_action('wp_head', 'custom_css_photovoltaik_reinigungsmittel');
    function custom_css_photovoltaik_reinigungsmittel() {
        if (is_category( 'photovoltaik-reinigungsmittel')) {
            ?>
    <code><style id=&quot;nelio-ab-testing-overlay&quot; type=&quot;text/css&quot;>@keyframes nelio-ab-testing-overlay{to{width:0;height:0}}body:not(.nab-done)::before,body:not(.nab-done)::after{animation:1ms 3000ms linear nelio-ab-testing-overlay forwards!important;background:#fff!important;display:block!important;content:&quot;&quot;!important;position:fixed!important;top:0!important;left:0!important;width:100vw;height:120vh;pointer-events:none!important;z-index:999999998!important}html.nab-redirecting body::before,html.nab-redirecting body::after{animation:none!important}</style></code>
            <?php
        }
    }

    Shouldn’t that do the trick? I just need some snippet for deactivating the default CSS. This will probably not work?

    add_action( 'wp_enqueue_scripts', function() {
        wp_dequeue_style( 'nelio-ab-testing-overlay' );
        wp_deregister_style( 'nelio-ab-testing-overlay' );
    }, 100 );
    • This reply was modified 1 month, 1 week ago by cutu234.
    Plugin Author David Aguilera

    (@davilera)

    There you go. Version 8.5.4 fixes the issue.

    Plugin Author David Aguilera

    (@davilera)

    (I just realized WordPress hasn’t made this new release public yet, but it should become available shortly).

    Thread Starter cutu234

    (@cutu234)

    Awesome, David! I haven’t tested it yet, but I’m sure it’s perfect! Great support! (I already gave 5 stars!)

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.