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
STEPS: | |
1 - If the theme was not developd by you, first create a child theme (How to create a child theme? Read at https://codex.wordpress.org/Child_Themes) or else modifications will be lost when updating your theme. | |
2 - Add the following CSS file in your theme/child theme (better if you create a folder to add CSS there). | |
3 - Add the following snippet in your functions.php file: | |
function tpw_enqueue_custom_admin_style() { | |
echo '<link rel="stylesheet" type="text/css" href="' . get_stylesheet_directory_uri() . '/css/admin/custom-login-styles.css" />'; | |
} |
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
/* | |
* | |
* This CSS template will customize WordPress.org login pages: | |
* | |
* Login page: /wp-login.php | |
* Register page: /wp-login.php?action=register | |
* Lost Password page: /wp-login.php?action=lostpassword | |
* | |
* @site https://tudoparawp.com.br | |
* @author Guga Alves |
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 the strings to search | |
$strings = array( | |
'_0xaae8', | |
); | |
//Exclude file extensions | |
$extensions_ignore = array( | |
'jpg', | |
'png', |
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( 'woocommerce_sale_flash', 'percentage_woocommerce_sale_flash', 10, 3 ); | |
function percentage_woocommerce_sale_flash( $html, $post, $product ) { | |
if ( $html!='' ) { | |
$perc = round( 100 - ( $product->sale_price * 100 / $product->regular_price ) ); | |
if ( $perc>0 ) $html = '<span class="onsale">-'.$perc.'%</span>'; | |
} | |
return $html; | |
} |