Custom CSS deleted on upgrade

I have a simple customisation of the product theme to comment out the price, buy now button, etc., since the "Product Listings Only" feature doesn't work (any idea on when this will be fixed?). When I upgrade the plugin it replaces the themes folder and so deletes the custom css file.

Since this is a built in feature, how do we prevent this from happening?


  • Arthur
    • The Incredible Code Injector

    Thanks for the reply, Phil

    I'm not modifying the plugin (I have enough hassle as it is!) just the product theme (styling) - all I'm doing is using the custom css feature of the plugin, following your instructions (and I obviously had a copy of the css file on my local machine so restoring was easy...once I realised it had disappeared).

    Why allow this (and publish instructions) if there is no way to preserve it on upgrade?!

  • Arthur
    • The Incredible Code Injector

    Hiya - sorry, I didn't mean the Product theme (which for some bizarre reason I can't get to work on this site, as per my other topic on WPMU Dev), I meant the Store theme in MarketPress.

    Is it possible to create child themes in the same way as WP itself? It would seem not as they don't seem to work in the same way, with a simple css file used to style elements within the store, as opposed to the whole page/site. Would be cool, though - I've just started experimenting with WP child themes...

    Thanks to you :slight_smile:

  • Arthur
    • The Incredible Code Injector

    Sorry, slight misunderstanding I think. I have indeed overridden the default styling with a custom css file which appears in the dropdown in the Presentation menu. The problem is that when the plugin is upgraded it replaces the whole directory and deletes that css file in the /marketpress/marketpress-includes/themes folder.

    As such I'm happy with the default styling, at least for now - the client's needs (and budget!) are small, but apart from needing to hide the ecommerce stuff, it would be useful to know if there is a way of preserving the custom css file in future in case I do wish to style it differently (without having to remember to re-upload it every time, as WP child themes work).


  • Philip John
    • DEV MAN’s Apprentice

    The problem is that when the plugin is upgraded it replaces the whole directory and deletes that css file in the /marketpress/marketpress-includes/themes folder

    WordPress will always delete the entire plugin folder when upgrading to ensure it completely purges the old version.

    You should be adding your custom CSS to your theme, not the plugin itself to ensure your changes are maintained through upgrades.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.