This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'wp_calculate_image_srcset_meta', '__return_null' ); | |
echo get_the_post_thumbnail( $page->ID, 'large' ); | |
remove_filter( 'wp_calculate_image_srcset_meta', '__return_null' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ssl_srcset( $sources ) { | |
foreach ( $sources as &$source ) { | |
$source['url'] = set_url_scheme( $source['url'], 'https' ); | |
} | |
return $sources; | |
} | |
add_filter( 'wp_calculate_image_srcset', 'ssl_srcset' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$send_time_rs = get_the_time('c'); | |
$updated_time_rs = get_the_modified_time('c'); | |
echo '<time class="published" style="display: none;" datetime="'; | |
echo $send_time_rs; | |
echo '">'; | |
echo $send_time_rs; | |
echo '</time> '; | |
if($send_time_rs!==$updated_time_rs) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$product = new WC_Product( get_the_ID() ); // in function.php maybe... | |
if( $product->is_type( 'simple' ) ){ | |
// a simple product | |
} elseif( $product->is_type( 'variable' ) ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM wp_options WHERE option_name LIKE "%swift_performance%" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'woocommerce_archive_description', 'rs_woo_category_description' ); | |
function rs_woo_category_description() { | |
$parentid = get_queried_object_id(); | |
$args = array( 'parent' => $parentid); | |
$terms = get_terms( 'product_cat', $args ); | |
if ( $terms ) { | |
echo '<hr>'; | |
echo '<div class="rssubcategories">'; | |
echo '<h2>Alkategóriák</h2>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE relations.*, taxes.*, terms.* | |
FROM wp_term_relationships AS relations | |
INNER JOIN wp_term_taxonomy AS taxes | |
ON relations.term_taxonomy_id=taxes.term_taxonomy_id | |
INNER JOIN wp_terms AS terms | |
ON taxes.term_id=terms.term_id | |
WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type='product'); | |
DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type = 'product'); | |
DELETE FROM wp_posts WHERE post_type = 'product'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sets the extension and mime type for .webp files. | |
* @param array $wp_check_filetype_and_ext File data array containing 'ext', 'type', and * 'proper_filename' keys. | |
* @param string $file Full path to the file. | |
* @param string $filename The name of the file (may differ from $file due to | |
* $file being in a tmp directory). | |
* @param array $mimes Key is the file extension with value as the mime type. | |
*/ | |
add_filter( 'wp_check_filetype_and_ext', 'wpse_file_and_ext_webp', 10, 4 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add that code to your WordPress site wp-config.php file. | |
* Replace the domain.tld to your site domain. | |
* Don't forget the https. | |
* Gist by Tamas Rottenbacher | |
* Source: https://wordpress.org/support/article/changing-the-site-url/ | |
*/ | |
define( 'WP_HOME', 'https://example.com' ); | |
define( 'WP_SITEURL', 'https://example.com' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php_value upload_max_filesize 128M | |
php_value post_max_size 128M | |
php_value max_execution_time 180 | |
php_value max_input_time 300 | |
php_value memory_limit 256M | |
php_value max_input_vars 10000 |
OlderNewer