ThemeShaper Forums » Thematic

[closed]

How can I change the WP-PageNavi style?

(5 posts)
  • Started 13 years ago by wprunner
  • Latest reply from wprunner
  • This topic is resolved
  1. wprunner
    Member

    Hello,

    I installed the WP-PageNavi plugin and I couldn't change its style whatever I try. Tried to place the pagenavi-css.css in the child theme directory, modified change the pagenavi-css.css in the plugin itself, and nothing worked.

    I then discovered that the thematic theme (parent theme) has a default.css that styles the wp-pagenavi class and it uses inside them the "!important" thing. Which just means that this is the style that is going to affect the output style. I don't understand how a default style can be given such tag. Usually, a default should give the ability to be overridden.

    Now, I don't want to change the thematic parent theme files, so how can I solve this problem using the child theme?

    Thanks.

    Posted 13 years ago #
  2. i don't usually import the default stylesheet. i usually copy it into my style.css file and mod away happily from there.

    Posted 13 years ago #
  3. as helga said. thats the best approach.
    in your pagnavi admin setting, unhceck 'use pagenavi css'

    the main styles you need for styling are...

    .wp-pagenavi {}
    .wp-pagenavi .pages {}
    .wp-pagenavi .current {}
    .wp-pagenavi .page {}
    .wp-pagenavi .previouspostslink {}
    .wp-pagenavi .nextpostslink {}

    for hover states

    .wp-pagenavi .page:hover {}
    .wp-pagenavi .current:hover {}
    .wp-pagenavi .previouspostslink:hover {}
    .wp-pagenavi .nextpostslink:hover {}

    alternatively, you can strip pagenavi of printing any styles via 'deregister script'

    add_action( 'wp_print_styles', 'my_deregister_styles', 100 );
    
    function my_deregister_styles() {
    	wp_deregister_style( 'wp-pagenavi' );
    }
    Posted 13 years ago #
  4. wprunner
    Member

    I created a separate stylesheet file for the WP-PageNavi and imported it as well to the bottom of style.css, it overriden those of the default.css. Problem resolved :)

    Posted 13 years ago #
  5. wprunner
    Member

    I realize that it is better for optimization to have it the way you've done it, but for thematic upgrading sake, it think that keeping the default.css imported is better. Thank you all.

    Posted 13 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.