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 | |
add_filter( 'get_the_archive_title', function ($title) { | |
// archiv rubriky | |
if ( is_category() ) { | |
$title = single_cat_title( '', false ); | |
// archiv štítku | |
} elseif ( is_tag() ) { |
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 | |
add_filter( 'get_the_archive_title', function ($title) { | |
// archiv rubriky | |
if ( is_category() ) { | |
$title = single_cat_title( 'Archiv rubriky' , false ); | |
// archiv štítku | |
} elseif ( is_tag() ) { |
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 | |
function my_manage_columns( $columns ) { | |
// remove the Yoast SEO columns | |
unset( $columns['wpseo-score'] ); | |
unset( $columns['wpseo-title'] ); | |
unset( $columns['wpseo-metadesc'] ); | |
unset( $columns['wpseo-focuskw'] ); | |
unset( $columns['wpseo-score-readability'] ); |
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 | |
add_shortcode( 'kbnt_svatek', 'kybernaut_svatek' ); |
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( 'allow_subdirectory_install', | |
create_function( '', 'return true;' ) | |
); |
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 | |
function change_wp_search_size($query) { | |
if ( $query->is_search ) // Make sure it is a search page | |
$query->query_vars['posts_per_page'] = 10; // Change 10 to the number of posts you would like to show | |
return $query; // Return our modified query variables | |
} | |
add_filter('pre_get_posts', 'change_wp_search_size'); // Hook our custom function onto the request filter |
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( 'woocommerce_billing_fields', 'wc_kbnt_filter_phone', 10, 1 ); | |
function wc_kbnt_filter_phone( $address_fields ) { | |
$address_fields['billing_phone']['required'] = false; | |
return $address_fields; | |
} |
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( 'woocommerce_checkout_fields' , 'wc_kbnt_override_checkout_fields' ); | |
function wc_kbnt_override_checkout_fields( $fields ) | |
{ | |
$fields['billing']['billing_phone']['custom_attributes'] = array( "pattern" => "^\+?{1}[0-9 ]{9,17}$" ); | |
return $fields; | |
} |
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
/** | |
* @snippet Add Stock Filter to Products page in WordPress admin | WooCommerce | |
* @comment Localization is automatic if you have localized WooCommerce to your language | |
* @source https://gist.github.com/vyskoczilova/fbc9dd818af20ff514cdb2d50eab410a | |
* @updatedversionof https://popoleodesigns.com/add-inout-of-stock-filter-to-wordpress-admin/ | |
* @author Karolína Vyskočilová | |
* @testedwith WooCommerce 3.0.7 | |
*/ | |
// ------------------- |
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 | |
/** | |
* @snippet Tax placeholders for Price Display Suffix | WooCommerce | |
* @comment Use "{tax_rate}" and "{tax_rate_label}" placeholder for displaying the product tax rate and its label | |
* @source https://gist.github.com/vyskoczilova/2ff56afcfd4c75338fb7f0be3a5615c2 | |
* @author Karolína Vyskočilová (https://kybernaut.cz) | |
* @testedwith WooCommerce 4.2 | |
*/ | |
// ------------------- |
OlderNewer