Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View lonchbox's full-sized avatar
😎

Pancho lonchbox

😎
View GitHub Profile
<?php function add_video_suffix( $title, $id = null ) {
if( in_the_loop() && in_category( 'Videos', $id ) ) {
$title .= ' [VIDEO]';
}
return $title;
}
add_filter( 'the_title', 'add_video_suffix' );
@jeherve
jeherve / plugin.php
Last active May 14, 2016 00:59
[Jetpack] Remove all CSS.
<?php
// First, make sure Jetpack doesn't concatenate all its CSS
add_filter( 'jetpack_implode_frontend_css', '__return_false' );
// Then, remove each CSS file, one at a time
// You probably won't need them all, unless you use all the modules, and all the themes! :)
// Some of these are also only loaded on specific admin pages, so it wouldn't affect your readers
function jeherve_remove_all_jp_css() {
wp_deregister_style( 'AtD_style' ); // After the Deadline
@psflannery
psflannery / remove_jetpack_styles.php
Created December 4, 2013 11:02
Remove Jetpack styles - list of enqueued jetpack stylesheets to remove if necessary. via - http://www.tjkelly.com/blog/remove-wordpress-jetpack-css/
function remove_jetpack_styles(){
wp_deregister_style('AtD_style'); // After the Deadline
wp_deregister_style('jetpack-carousel'); // Carousel
wp_deregister_style('jetpack-slideshow'); // Jetpack Slideshow
wp_deregister_style('grunion.css'); // Grunion contact form
wp_deregister_style('the-neverending-homepage'); // Infinite Scroll
wp_deregister_style('infinity-twentyten'); // Infinite Scroll - Twentyten Theme
wp_deregister_style('infinity-twentyeleven'); // Infinite Scroll - Twentyeleven Theme
wp_deregister_style('infinity-twentytwelve'); // Infinite Scroll - Twentytwelve Theme
wp_deregister_style('noticons'); // Notes
// Get The Page ID You Need
get_option( 'woocommerce_shop_page_id' );
get_option( 'woocommerce_cart_page_id' );
get_option( 'woocommerce_checkout_page_id' );
get_option( 'woocommerce_pay_page_id' );
get_option( 'woocommerce_thanks_page_id' );
get_option( 'woocommerce_myaccount_page_id' );
get_option( 'woocommerce_edit_address_page_id' );
get_option( 'woocommerce_view_order_page_id' );
get_option( 'woocommerce_terms_page_id' );
@dan-westall
dan-westall / wp_get_object_terms_exclude_filter.php
Last active August 9, 2017 01:23
Allowing wp_get_object_terms to exclude terms with a filter.
<?php
///////Example usage//////////
//get object terms for $post->ID with taxonomies categories and tags,
//args set as fields all and exclude term with id 1
$terms = wp_get_object_terms(
$post->ID,
array(
@tmayr
tmayr / gist:5190565
Created March 18, 2013 20:34
Foundation Topbar IE8 Fix
.lt-ie9 .top-bar {
background: #2f2f2f;
*zoom: 1;
overflow: visible;
}
.lt-ie9 .top-bar:before, .lt-ie9 .top-bar:after {
content: " ";
display: table;
}
.lt-ie9 .top-bar:after { clear: both; }
/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }
<?php
if ( ! function_exists( 'wp_new_user_notification' ) ) :
function wp_new_user_notification( $user_id, $plaintext_pass = '' ) {
// Return early if no password is set.
if ( empty( $plaintext_pass ) ) {
return;
}
$user = get_userdata( $user_id );
@ivanmendoza
ivanmendoza / icons.less
Created May 12, 2012 10:17
An approach to manage icons using mixins(LessCSS) and CSS Sprites
/*
*
* Icon index
* by @dic7 (github: ivanmendoza)
*
*/
/*
* SPRITE
* url: ../images/icons.png
@kevinSuttle
kevinSuttle / meta-tags.md
Last active March 31, 2024 14:26 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags