Viewing 1 replies (of 1 total)
  • Hi Ron,

    It’s never a good idea to edit a ‘base’ file for a plugin (or WordPress itself) because if/whenever you update it your changes will be over-written and you’ll have to edit the file again. Instead it is better to implement the changes you require in a way that over-rides the ‘default’ *thing* you’re trying to change (i.e. in another file which supersedes the one you want to change).

    In the case of styles this should be easy since CSS is ‘cascading’ in it’s nature and so has a logical over-ride syntax structure. Which means that in order to over-ride the default styles in the plugin you simply need write a ‘heavier'[1] style rule, and make sure that it is loaded after the plugin’s styles.

    Since plugin’s are set up before the active theme then any style-sheet loaded by your theme should work to over-ride the plugin styles. — FYI the WPUF plugin uses the ‘wp_enqueue_style’ action hook.

    [1] Note: ‘heavier’ means a more specific rule (based on CSS’s rule weighing metrics, e.g.#IDs ‘weigh’ more than .classes, which weigh more than <elements>). The best way to increase weight is to increase selector specificity, usually by adding an appropriate #ID.

    If you are struggling to achieve an over-ride then, at a push, if you absolutely have to, you can use the ‘!important’ suffix to ‘force’ an over-ride on the appropriate style rule(s), but this is best avoided if possible!

    hth

Viewing 1 replies (of 1 total)
  • The topic ‘how to change the style? :/’ is closed to new replies.