• Resolved donpi73

    (@donpi73)


    Hello,
    is there a way to go back to the old plugin behavior (2 or 3 versions ago), in which it was possible to exclude the upload of the photoswipe JSS and CSS files on the HOME page or on the aArchive pages etc?
    I use need photoswipe only in single posts and single pages, and it seems useless to load all those KBs on the HOME and in the lists of posts etc… also for reasons of SEO score…

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    What “old plugin behaviour” do you refer to? There was never an option to exclude the plugin on the home page or archive pages.

    If you need this, you can do this by adding a custom filter in your themes functions.php as described in the FAQ:

    function my_lbwps_enabled($enabled, $id)
    {
        // Disable the plugin for home page and archive pages
        if (is_front_page() || is_archive()) {
            return false;
        }
    
        return $enabled;
    }
    
    add_filter('lbwps_enabled', 'my_lbwps_enabled', 10, 2);

    Edit:

    Also note that for SEO it makes no difference, if the frontend script for the lightbox is loaded or not.

    • This reply was modified 4 years, 4 months ago by Arno Welzel.
    Thread Starter donpi73

    (@donpi73)

    What “old plugin behaviour” do you refer to? There was never an option to exclude the plugin on the home page or archive pages.

    THIS!:
    3.0
    …New backend interface…
    …added option to exclude…
    ==>> The lightbox will no longer be disabled on the home page, archive pages or search results if it is disabled in one or more pages/posts.

    Plugin Author Arno Welzel

    (@awelzel)

    The old behaviour before 3.0 was to include the plugin also on the homepage and archive pages by default. It was only excluded of one of the pages or posts visible on the home page or on an archive page.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘disable lightbox on home page (and lists, tags etc…)’ is closed to new replies.