• Resolved Joe777

    (@joe777)


    Recently the galleries on my website started displaying as one long column. I don’t know what event caused this to start happening – I suspect it was a new version of WP. I am currently running @nickg’s latest version (July 3 2022). As an experiment, I loaded the last WP version (version 1.9.35 from an old backup), and it had the same problem. When I debug using Chrome Developer Tools, I find that the nggallery.css file is not being used. I can fix it by copying the css from nggallery.css into into my theme file. But, that is a band-aide solution. The URL I provided is from my test site. In my ‘live’ site (thelesters.net), I updated the CSS in my theme with code from nggallery.css to make it work. Can you provide any clues as to why this is happening?

    Thanks very much for any suggestions that you have.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Does it work if you replace line 549 of nggallery.php with this?

    wp_enqueue_style('NextGEN', NGGALLERY_URLPATH . 'css/nggallery.css', false, '1.0.0', 'screen');

    I.e. just change the second argument from $path to NGGALLERY_URLPATH . 'css/nggallery.css'. Presumably the previous line where it tries to convert the CSS file path to a URL is going wrong (although it’s working ok for me on the latest WordPress).

    $path = str_replace( NGG_CONTENT_DIR , $replace, $this->options['CSSfile']);
    Thread Starter Joe777

    (@joe777)

    Yes, that works! Thank you! Now the mystery to me is why the original code quit working. I spent a little bit of time on it, but no success. I can’t debug on my hosting company server (fatcow.com), but I can using Netbeans on my local computer (I have XAMPP). But, it works on localhost. I upgraded to php7.4 on the server in September, but didn’t see the problem then. My hosting server is at 7.4.10, and XAMPP is at 7.4.29. I don’t think that should matter.

    Your code seems more straightforward, and it’s not clear to me what the advantage of the original code is.

    I will use your code. If I ever download a updated version, I’ll have to remember to check this and make the change to the file if necessary.

    Thanks very much for your help, and for your solution.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Thumbnail gallery is in one column’ is closed to new replies.