- התקן תוסף זה: https://wordpress.org/plugins/autoptimize/
- אפשר באפשרויות שלו wp-admin / options-general.php? Page = optimize באופן אוטומטי 'לייעל את קוד ה- HTML?'
- בפונקציות הקובץ.php של נושא ה- wp הנוכחי שלך החל את הקוד הבא123456789101112131415161718add_filter('autoptimize_html_after_minify', function($content) {$site_url = 'https://bulk-editor.com/';$content = str_replace("", ' ', $content);$content = str_replace('', ' ', $content);$content = str_replace(" ", ' ', $content);$content = str_replace(' ', ' ', $content);$content = str_replace($site_url . '/wp-includes/js', '/wp-includes/js', $content);$content = str_replace($site_url . '/wp-content/cache/autoptimize', '/wp-content/cache/autoptimize', $content);$content = str_replace($site_url . '/wp-content/themes/', '/wp-content/themes/', $content);$content = str_replace($site_url . '/wp-content/uploads/', '/wp-content/uploads/', $content);$content = str_replace($site_url . '/wp-content/plugins/', '/wp-content/plugins/', $content);return $content;}, 10, 1);
- אל תשכח ב- $ site_url שנה את הקישור לקישור האתר שלך ללא קו נטוי בקצהו
