Home Forums Consulting – Business WordPress Theme Custom Colors problem

This topic contains 0 replies, has 1 voice, and was last updated by  Stylemix Themes 8 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #4171

    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 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 – https://codex.wordpress.org/Changing_File_Permissions.
    4. Set up WordPress Upgrade Constants with FS_METHOD – https://codex.wordpress.org/Editing_wp-config.php.
    5. At the end, check if WP_Filesystem is working correctly. You can check it using below code in your functions.php. If print_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

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.