Custom Colors problem

Started by: Stylemix Themes May 25, 2017 - 06:58

We use our own system for Custom Colors. This systemgets the main style CSS file content and creates new generated styles file under ../wp-content/uploads/ folder. If 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 (CDN, CloudFlare, 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. At 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 meansWP_Filesystemis 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

No reply yet.
You must be logged in to reply to this topic.