Support » Plugin: FooGallery - Image Gallery WordPress Plugin » Load foobox js/css and lightbox files only on gallery pages

  • Resolved cmsnext


    Hi @bradvin

    Is there any way to disable / deregister foobox files and scripts like js/css, inline script and function calls on all pages other than gallery pages?

    As for homepage we dont have any foobox gallery or foobox lightbox yet many of its dependencies like css/js inline code and call to functions are found

    So I would like to disable / deregister all these files being added on other pages which have no gallery or lightbox requirement.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author bradvin


    hi @cmsnext

    Yes, FooBox comes with a setting to turn off all assets being added by default, and then you “opt in” to pages that you want FooBox to be included.

    Check out the settings of FooBox, under the Advanced tab. The setting is called “Exclude FooBox Assets”. You need to enable that.

    Then when editing each page, there is a new section/metabox which allows you to include FooBox.

    @bradvin Thanks ya I had tried that. But once you go to individual gallery and when we click on the images a lightbox opens but the loading icon, arrows and closing button fonts are missing on that page. Any reason why that would happen? And is there no way to say change fonts to fontawesome as most themes come with the fonts as default so we can reduce number of files/css/font files in the requests.

    Hi @bradvin

    I updated to the latest version but this issue is still not fixed.

    If we Exclude FooBox Assets and call it only on the gallery page, when we have light box on individual gallery photos, the lightbox which popups up does not show the previous next and close buttons but shows weird characters (as it seems font files dont load)

    So any quick fix how I can solve this issue?

    Plugin Author bradvin


    Can you link to your page with the issue please?

    @bradvin Ok figured out the issue. This line

    .fbx-modal .fbx-error-msg>span, .fbx-modal .fbx-loader>div, .fbx-modal a.fbx-close, .fbx-modal a.fbx-next, .fbx-modal a.fbx-prev {
        font-family: foobox;

    I changed it to

    font-family: foobox !important;

    and now the icons show up fine.

    Thanks for the help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.