Motors - Car Dealership & Classified Listings Mobile App for Android & iOS

Custom Colors problem

This article describes how to solve the custom colors problem.

We use our own system for Custom Colors. This system gets the main style CSS file content and creates new generated styles file under ../wp-content/uploads/ folder. If the Custom Colors system is not working on your site, you need to check below options:

  1. Disable all caching and optimizing plugins in your site (CDNCloudFlare, and Akamai systems also).
  2. Check if your hosting supports PHP FILE extension.
  3. Correct File Permissions for WordPress and uploads folder -
  4. Set up WordPress Upgrade Constants withFS_METHOD-
  5. In the end, check if WP_Filesystem is working correctly. You can check it using below code in your functions.php. Ifprint_r() doesn't show any results, it means WP_Filesystem is not working on your site. In this case, you can contact your hosting providers with this issue.

global $wp_filesystem;
if ( empty( $wp_filesystem ) ) {
require_once ABSPATH . '/wp-admin/includes/file.php'; WP_Filesystem();
$style_css = $wp_filesystem->get_contents( get_template_directory() . '/style.css' ); print_r($style_css);
//display style.css file content


Was this article helpful?

Yes No

Thanks so much for your feedback!

Thanks so much for your suggestion!