404 to home

Adding this code in your theme’s 404.php file. Place this code at the very beginning: <?php header(“HTTP/1.1 301 Moved Permanently”); header(“Location: “.get_bloginfo(‘url’)); exit(); ?>

Kategória oldal ABC sorrendben

functions.php-ba kell másolni add_action( ‘pre_get_posts’, ‘my_change_sort_order’); function my_change_sort_order($query){ if(is_archive()): //If you wanted it for the archive of a custom post type use: is_post_type_archive( $post_type ) //Set...

On sale felirat %

add_filter( ‘woocommerce_sale_flash’, ‘add_percentage_to_sale_badge’, 20, 3 ); function add_percentage_to_sale_badge( $html, $post, $product ) { if( $product->is_type(‘variable’)){ $percentages = array(); // Get all variation prices...

Exclude Pages from Search

//Exclude pages from WordPress Search if (!is_admin()) { function wpb_search_filter($query) { if ($query->is_search) { $query->set(‘post_type’, ‘post’); } return $query; } add_filter(‘pre_get_posts’,’wpb_search_filter’);...

Gzip compression – Plugin nélkül

The code below should be added to your .htaccess file… <ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.*...