View wp-admin bar CSS fix
1 2 3
@media (max-width: 600px) {
html #wpadminbar{top:-46px} /* wp admin bar fix, due to slide-push menu putting a relative position on the body element */
}
View wc-shop-loop-columns.php
1 2 3 4 5 6 7 8 9 10
<?php
add_filter( 'loop_shop_columns', 'wc_loop_shop_columns', 1, 10 );
/*
* Return a new number of maximum columns for shop archives
* @param int Original value
* @return int New number of columns
*/
function wc_loop_shop_columns( $number_columns ) {
View nav pipes
1 2 3 4 5 6 7 8 9 10
#site-navigation ul li:after {
content: '|';
color: #fff;
font-size: 10px;
line-height: 24px;
float: left;
}
 
#site-navigation ul li:last-child:after {
content: ' ';
View wordpress change category dropdown text
1 2 3 4 5
function ChangeSelectTitle($cat_args){
$cat_args['show_option_none'] = __('My Category');
return $cat_args;
}
add_filter('widget_categories_dropdown_args', 'ChangeSelectTitle');
View CSS
1 2 3 4 5 6 7 8 9 10
.thing {
float: left;
width: 50%;
margin: 10px 0;
box-sizing: border-box;
text-align: center;
background: #e0e0e0;
}
 
.thing--one {
View dynamic mobile menu
1 2 3 4 5 6 7 8 9 10
//function for showing/hiding mobile menu dynamically
function mobileMenuToggle(){
//get height of menu and auto-detect when it needs to switch to mobile version
var menuHeight = $('#site-navigation').height();
 
//menu pushed onto 2 lines, hide it and show mobile one
if((isMobile == false) && (menuHeight > 30)){ //EDIT THIS HEIGHT!
//get the current browser width, as once the browser is this width (or wider) again, normal menu will need to kick in.
$('#site-navigation').hide();
$('#mobile').show();
View gist:4fc8e575d82529a19dab
1 2 3
-webkit-appearance: none;
border-radius: 0;
-webkit-border-radius: 0;
View Placeholder text colour
1 2 3 4 5 6 7 8 9 10
::-webkit-input-placeholder {
color: red;
}
 
:-moz-placeholder { /* Firefox 18- */
color: red;
}
 
::-moz-placeholder { /* Firefox 19+ */
color: red;
View compare arrays
1 2 3 4 5 6 7 8 9 10
function compareArrays(sup, sub) {
sup.sort();
sub.sort();
var i, j;
for (i=0,j=0; i<sup.length && j<sub.length;) {
if (sup[i] < sub[j]) {
++i;
} else if (sup[i] == sub[j]) {
++i; ++j;
} else {
View gist:ebfb68cee0bc005d1892
1
[wpv-if fieldname="wpcf-fieldname" evaluate="empty(fieldname)" condition="false"][/wpv-if]
Something went wrong with that request. Please try again.