Viewing 8 replies - 1 through 8 (of 8 total)
  • Alex Rabe

    (@alexrabe)

    Look for wp_head() in your theme files (compare the default theme)

    jennsweb

    (@jennsweb)

    I think I am experiencing a related issue. I am trying to use Nextgen for a custom template theme and when I set the template for the pages using NGG to any other template than the one for the site’s blog section (which needs to have a different header) the gallery appears but the images don’t “work” as links to a viewer. How does Nextgen know which header template to load the JavaScript in? Is there a way to change it?
    Thanks for a great plugin! This issue is actually giving me a good lesson on how NGG actually works.

    My custom template was missing wp_head() from header.php.

    Adding this line just before the <head...> tag in header.php solved the same problem for me:

    <?php wp_head(); ?>

    Thread Starter marcopolo

    (@marcopolo)

    Thanks for the suggestions.

    I ultimately fixed it with a low-tech hack: I added the missing styles from nggallery.css to my main theme stylesheet. Looks fine now.

    See the fixed gallery here:
    https://www.coastalsurvey.com/mag/album/

    probably the reason is because you have selected the style which is not the default. You should look and make sure that you have the correct one ngg_k2.css for example you can verify it by looking at your page and view the sources. Just my 2 cents

    My guess is that something is being messed up when you export the database from your local environment into the production environment.

    Exactly the same thing happened to me when I did the opposite thing.. copied the database from my production environment to refresh the content of my test environment.

    I had a similar kind of problem with another plugin (cforms) when I regularly copied data between sites. The problem was solved when I switched to phpMyAdmin exports from mysqldump.

    Nextgen Gallery stores serialized objects in the options table (just like cforms does)

    Probably an encoding problem…

    /johan

    I had the same problem: The css file was not written to the header. I had to add it manually. Once I did that, another problem was also fixed: Gallery thumbnails were displayed in a vertical row that was just one thumbnail wide. Once I added this to the header.php file, the display returned to normal: ‘<link rel=”stylesheet” href=”https://www.mysite.com/wp-content/plugins/nextgen-gallery/css/nggallery.css&#8221; type=”text/css” media=”screen” />’.

    The problem occurred after a move to a new server, so maybe the database export/import was to blame.

    szzsolt, that worked!! Thank you! Adding <?php wp_head(); ?> to the header.php file solved it.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: NextGEN Gallery] nggallery.css link not written to header’ is closed to new replies.