WordPress.org

Ready to get started?Download WordPress

Forums

WP-Paginate
[bug] wp-paginate.css not detected in child themes (2 posts)

  1. ururk
    Member
    Posted 1 year ago #

    WP-paginate uses TEMPLATEPATH to detect a local copy of wp-paginate.css, but a child theme returns the parent's directory. I fixed it by using get_stylesheet_directory(). Thoughts?

    function wp_paginate_css() {
    			$name = "wp-paginate.css";
    			if (false !== @file_exists(get_stylesheet_directory() . "/$name")) {
    				$css = get_stylesheet_directory_uri() . "/$name";
    			}
    			else {
    				$css = $this->pluginurl . $name;
    			}
    			wp_enqueue_style('wp-paginate', $css, false, $this->version, 'screen');
    
    			if (function_exists('is_rtl') && is_rtl()) {
    				$name = "wp-paginate-rtl.css";
    				if (false !== @file_exists(get_stylesheet_directory() . "/$name")) {
    					$css = get_stylesheet_directory_uri() . "/$name";
    				}
    				else {
    					$css = $this->pluginurl . $name;
    				}
    				wp_enqueue_style('wp-paginate-rtl', $css, false, $this->version, 'screen');
    			}
    		}

    http://wordpress.org/extend/plugins/wp-paginate/

  2. nowton
    Member
    Posted 1 year ago #

    Same here.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.