• hello there,

    maybe someone can help me out a bit. it’s about the nextgen gallery plugin and the custom css file nggallery.css

    i need to customize this file and then it says that i have to put it into my themes folder in another folder called nggallery

    so it looks like this ->

    /wp-content/themes/mytheme/nggallery/nggallery.css

    but if i do a reload of the page and even clear my browser cache and WP super cched file the custom css file in my theme folder NEVER gets loaded.

    if i look in the page source it tells me that it is loading the standard file ->

    https://mydomain.com/wp-content/plugins/nextgen-gallery/css/nggallery.css?ver=1.0.0

    does someone know a fix for this? what is the correct path? or do i need to do something else to get this working?

    thanks in advance
    greetings
    becki

Viewing 1 replies (of 1 total)
  • Thread Starter Becki Beckmann

    (@becki)

    ok … sorry for actually posting this. had a quick look in the source code and after that it was quite clear how this custom css file for nextgen gallery plugin is working

    it just needs to be in the root on the theme directory and not in an additional folder /nggallery

    /**
    	 * Look for the stylesheet in the theme folder
    	 *
    	 * @return string path to stylesheet
    	 */
    	function get_theme_css_file() {
    
      		// allow other plugins to include a custom stylesheet
    		$stylesheet = apply_filters( 'ngg_load_stylesheet', false );
    
    		if ( $stylesheet !== false )
    			return ( $stylesheet );
    		elseif ( file_exists (STYLESHEETPATH . '/nggallery.css') )
    			return get_stylesheet_directory_uri() . '/nggallery.css';
    		else
    			return false;
    	}

    the constant STYLESHEETPATH is declared via this function

    /**
    	 * Filesystem path to the current active template stylesheet directory
    	 * @since 2.1.0
    	 */
    	define('STYLESHEETPATH', get_stylesheet_directory());

    so … simply put your custom css in the root of your theme and all is fine ??

    probably this might help someone?

    thanks, and sorry for wasting your time

    greetings
    becki

Viewing 1 replies (of 1 total)
  • The topic ‘nextgen gallery custom css nggallery.css into themes folder not working’ is closed to new replies.