Homepage not loading correctly, only after refreshing

You can change your current theme to storefront and check whether the scripts and styles are properly enquequed. use this format to enqueque style and scripts and inspect the code for debugging class yourPluginName { public function __construct() { add_action(‘wp_enqueue_scripts’, array($this, ‘enqueue’)); } public function enqueue() { wp_enqueue_script(“jquery”); wp_enqueue_script(‘my-js’, plugins_url(‘/script.js’, __File__)); wp_enqueue_style(‘my-theme’, plugins_url(‘/style.css’, __File__)); }

Blocking Google Fonts in wordpress website

If you check your source code and look for “fonts.” you will find a line that is calling the stylesheet. This could be “googleapis.com” or “google.com or other URL. Here’s how mine looks (using Astra theme); <link rel=”stylesheet” id=’astra-google-fonts-css’ href=”https://fonts.googleapis.com/css?family=Roboto%3A400%2C&#038;display=fallback&#038;ver=4.0.2″ media=”all” /> Make note of the ID (astra-google-fonts-css) and then add the following to your … Read more