• Hi,

    is there any problem between SHOW ALT ATTRIBUTE OUTSIDE and the reponsive view? Every images with an alt attribute goes hight: 0; and width:0; in mobile view. In desktop ist everything fine. Is there an issues?

    EDIT:

    Ahhhhhh with LEGACY everything is fine :)…..

    Furthermore: is it possible to load every js and css only on certain pages? Maybe some lines in the functions.php? I need every kb to get an good pageload:)

    Sorry for my english. I will do my best 🙁

    • This topic was modified 2 years, 9 months ago by janwill.
    • This topic was modified 2 years, 9 months ago by janwill.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi, with which version did you encounter the issue on mobile?

    To disable (or only enable) Fancybox on certain pages, your can find instructions on https://premium.status301.com/knowledge-base/easy-fancybox/disable-fancybox-on-certain-pages/

    Thread Starter janwill

    (@janwill)

    Hi,

    thx for reply. I use the newest version 1.9.5…
    I have test the snippet like this:

    add_action(
    ‘wp_enqueue_scripts’,
    function() {
    class_exists(‘easyFancyBox’) && !is_page(‘home’) && easyFancyBox::$add_scripts = false;
    },
    0
    );

    But nothing is happend. Do you can take a look, what is wrong with the snippet or I have a syntaxerror? I need the js and css files only on 4 pages and I use ACF with customs settings to handle some other css and js files. My customers can choose, if js/css is loading or not on every page like:

    if ( get_field( ‘contact’ ) ):
    some-files.css
    endif

    In the backend on every pages are buttons to choose YES or NOT

    Is is it possible to modify the code above like this:

    add_action(
    ‘wp_enqueue_scripts’,
    function() {
    class_exists(‘easyFancyBox’) && CHECK-ACF-FIELD-YES && easyFancyBox::$add_scripts = false;
    },
    0
    );

    hui… sorry for my english… I hope you understand my plans 🙂

    • This reply was modified 2 years, 9 months ago by janwill.
    Thread Starter janwill

    (@janwill)

    Or is it only possible with the pro version:

    https://premium.status301.com/knowledge-base/easy-fancybox/disable-fancybox-on-certain-pages/

    • This reply was modified 2 years, 9 months ago by janwill.

    Hi, are you using a code snippets plugin or adding this to your theme’s functions.php? Make sure the quote marks are ' not ’

    For ACF you should be able to use something like get_field('my_checkbox_field') if I’m not mistaken. For safety you could add an extra check so that the snippet will not cause a PHP error if ACF is deactivated:

    add_action(
        'wp_enqueue_scripts',
        function() {
            if ( class_exists('easyFancyBox') && function_exists('get_field') && ! get_field('lightbox_enabled') ) {
                easyFancyBox::$add_scripts = false;
            }
        },
        0
    );

    Note: in thsi example I am supposing the ACF field is a checkbox called lightbox_enabled and either returns a 1 (checked) or empty (unchecked).

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

The topic ‘issues alt attribute’ is closed to new replies.