This file contains hidden or 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
%white-div{ | |
color:#fff; | |
} | |
@for $j from 1 to 6{ | |
div-#{$j}{ | |
@extend %white-div; | |
} | |
} |
This file contains hidden or 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 page slug in body class | |
* | |
* @global type $post | |
* @param string $classes | |
* @return string | |
*/ | |
//Page Slug Body Class | |
function add_slug_body_class( $classes ) { |
This file contains hidden or 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
@mixin sidebar-title-icon($content){ | |
.widget-title{ | |
&::before{ | |
font-family: "Ionicons"; | |
content: $content; | |
display: inline-block; | |
margin: 0 10px 0 0; | |
} | |
} | |
} |
This file contains hidden or 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('plugins_loaded', function(){ | |
function woocommerce_variable_add_to_cart() { | |
global $product, $post; | |
// print_r($product->product_type); | |
$variations = $product->get_available_variations(); | |
// ob_start(); // Start buffering | |
?> | |
<form class="cart" action="<?php echo esc_url($product->add_to_cart_url()); ?>" method="post" enctype="multipart/form-data"> | |
<table class="dro-variable-product" id="dro-variable-product"> | |
<tbody> |
This file contains hidden or 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('pre_get_posts', 'cgy_same_day'); | |
function cgy_same_day($query) { | |
if ($query->is_home() && $query->is_main_query()) { | |
$today = getdate(); | |
$query->set('date_query', array( | |
array( | |
'day' => $today['mday'], |
This file contains hidden or 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
if(isset($_POST['log']) && !empty($_POST['log']) && $_POST['log']==1){ | |
$login = trim($_POST['login']); | |
$pw = trim($_POST['pw']); | |
if(strlen($login) == 6 && strlen($pw) == 6){ | |
$n_log=0; |
This file contains hidden or 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 my_remove_filter($tag, $function_name, $priority = 10){ | |
global $wp_filter; | |
if( isset($wp_filter[$tag]->callbacks[$priority]) and !empty($wp_filter[$tag]->callbacks[$priority]) ){ | |
$wp_filter[$tag]->callbacks[$priority] = array_filter($wp_filter[$tag]->callbacks[$priority], function($v, $k) use ($function_name){ | |
return ( stripos($k, $function_name) === false ); |
This file contains hidden or 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
// functions.php | |
class themeslug_walker_nav_menu extends Walker_Nav_Menu { | |
// add classes to ul sub-menus | |
function start_lvl(&$output, $depth) { | |
// depth dependent classes | |
$indent = ( $depth > 0 ? str_repeat("\t", $depth) : '' ); // code indent | |
$display_depth = ( $depth + 1); // because it counts the first submenu as 0 | |
$classes = array( | |
'sub-menu', |
This file contains hidden or 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_sale_flash', 'wc_custom_replace_sale_text' ); | |
function wc_custom_replace_sale_text( $html ) { | |
return str_replace( __( 'Sale!', 'woocommerce' ), __( 'My sale text!', 'woocommerce' ), $html ); | |
} |
This file contains hidden or 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 | |
/** | |
* The template for displaying archive pages | |
* | |
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/ | |
* | |
* @package WordPress | |
* @subpackage Twenty_Nineteen | |
* @since 1.0.0 | |
*/ |
OlderNewer