Disable load of Prettyphoto Lightbox

Support Forums for LiveMesh Themes & Plugins Forums Agile Theme Support Disable load of Prettyphoto Lightbox

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #12267
    RickG
    Member

    I’d like to disable the loading of prettyphoto so I can replace it with another lightbox that is easier for a user to control.

    In the framework.php file I find the following references:

    wp_enqueue_script('jquery-prettyphoto', MO_SCRIPTS_LIB_URL . '/jquery.prettyPhoto.js', array('jquery'), '3.1.4', true);
    
    wp_register_style('pretty-photo', MO_THEME_URL . '/css/prettyPhoto.css', array(), false, 'screen');
    
    wp_register_style('style-theme', get_stylesheet_uri(), array('pretty-photo', 'icon-fonts'), false, 'all');
    
    wp_enqueue_style('pretty-photo');
    

    Can I simply comment these out w/o errors? And what happens if there is an update to the theme?

    Many thanks –

    #12281
    Raghavendra
    Moderator

    That should work. Instead of commenting, you may want to deregister styles/scripts using code as explained in the below post –

    https://wordpress.org/support/topic/child-theme-removing-scripts-from-parent-functionsphp

    in your child theme if you want to protect yourself during future updates.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Agile Theme Support’ is closed to new topics and replies.