Title: issues alt attribute
Last modified: June 29, 2023

---

# issues alt attribute

 *  [janwill](https://wordpress.org/support/users/janwill/)
 * (@janwill)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/issues-alt-attribute/)
 * 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, 11 months ago by [janwill](https://wordpress.org/support/users/janwill/).
    -  This topic was modified 2 years, 11 months ago by [janwill](https://wordpress.org/support/users/janwill/).

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

 *  [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/issues-alt-attribute/#post-16858898)
 * 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/](https://premium.status301.com/knowledge-base/easy-fancybox/disable-fancybox-on-certain-pages/)
 *  Thread Starter [janwill](https://wordpress.org/support/users/janwill/)
 * (@janwill)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/issues-alt-attribute/#post-16859463)
 * 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.cssendif
 * 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, 11 months ago by [janwill](https://wordpress.org/support/users/janwill/).
 *  Thread Starter [janwill](https://wordpress.org/support/users/janwill/)
 * (@janwill)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/issues-alt-attribute/#post-16859759)
 * Or is it only possible with the pro version:
 * [https://premium.status301.com/knowledge-base/easy-fancybox/disable-fancybox-on-certain-pages/](https://premium.status301.com/knowledge-base/easy-fancybox/disable-fancybox-on-certain-pages/)
    -  This reply was modified 2 years, 11 months ago by [janwill](https://wordpress.org/support/users/janwill/).
 *  [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/issues-alt-attribute/#post-16861569)
 * 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:
 *     ```wp-block-code
       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.

 * ![](https://ps.w.org/easy-fancybox/assets/icon-256x256.png?rev=3188201)
 * [Firelight Lightbox](https://wordpress.org/plugins/easy-fancybox/)
 * [Support Threads](https://wordpress.org/support/plugin/easy-fancybox/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-fancybox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-fancybox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-fancybox/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/issues-alt-attribute/#post-16861569)
 * Status: not resolved