Skip to content

Instantly share code, notes, and snippets.

/*========================================================================
Tag Cloud Filter
========================================================================*/
add_filter('widget_tag_cloud_args', 'filter_tag_cloud_limit');
function filter_tag_cloud_limit($args){
$args['number'] = ''; // Removes limit on number of tags
return $args;
@gstricklind
gstricklind / style.css
Created October 5, 2016 02:05
CSS Long Shadow with Alpha Transparency
.long-shadow {
text-shadow: rgba(18, 128, 106,1) -1px 1px,
rgba(18, 128, 106,0.99) -2px 2px,
rgba(18, 128, 106,0.98) -3px 3px,
rgba(18, 128, 106,0.97) -4px 4px,
rgba(18, 128, 106,0.96) -5px 5px,
rgba(18, 128, 106,0.95) -6px 6px,
rgba(18, 128, 106,0.94) -7px 7px,
rgba(18, 128, 106,0.93) -8px 8px,
rgba(18, 128, 106,0.92) -9px 9px,
@gstricklind
gstricklind / styles.css
Created December 10, 2016 18:39
Tabbed WooCommerce My Account
body.woocommerce-account .woocommerce-MyAccount-navigation ul {
margin: 0;
}
body.woocommerce-account .woocommerce-MyAccount-navigation ul li {
list-style: none;
}
body.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
text-decoration: none;
}
@gstricklind
gstricklind / functions.php
Last active January 25, 2018 01:38
Add data attribute with variable term_id to wp_list_categories
<?php
/*========================================================================
Filter wp_list_categories to add new attribute
========================================================================*/
add_filter('wp_list_categories','moons_ajax_onclick');
function moons_ajax_onclick($output){
//if (is_post_type_archive('crew')) { // localize this filter if needed
//if not using a CPT then change get_terms to get_categories
@gstricklind
gstricklind / style.css
Created July 14, 2017 18:57
Change Beaver Build Icon style +remove icon background
/* change social icons */
.fl-social-icons .fa-stack i:first-child {
display: none;
}
.fl-social-icons .fa-stack i:nth-child(2) {
color: inherit;
}
@gstricklind
gstricklind / puzzle-single.php
Created February 18, 2018 19:56
Open ALL links in new tab for a custom post type or page template type
// use this code in your page template where needed
function gs_target_blank($content) {
$post_string = $content;
$post_string = str_replace('<a', '<a target="_blank"', $post_string);
return $post_string;
}
add_filter( 'the_content', 'gs_target_blank' );
@gstricklind
gstricklind / functions.php
Last active February 18, 2018 20:29
Remove tag cloud limit
add_filter('widget_tag_cloud_args', 'gs_filter_tag_cloud_limit');
function gs_filter_tag_cloud_limit($args){
//Optionally change the taxonomy
//if(isset($args['taxonomy']) && $args['taxonomy'] == 'post_tag'){
$args['number'] = ''; //Restrict number of tags
//}
return $args;
}
@gstricklind
gstricklind / single-product.php
Last active February 24, 2019 04:25
Adds Beaver Builder To The Bottom of Product Pages using get_template_part( 'content', 'product' )
<?php
//https://ginastricklind.com/make-beaver-builder-work-on-woocommerce-product-pages/
/**
* The Template for displaying all single products
*
* This template can be overridden by copying it to yourtheme/woocommerce/single-product.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
@gstricklind
gstricklind / content-product.php
Last active February 24, 2019 04:26
The Content File to Add Beaver Builder Editable Content to Single Product Pages
<?php
////https://ginastricklind.com/make-beaver-builder-work-on-woocommerce-product-pages/
do_action( 'fl_before_post' ); ?>
<?php do_action( 'fl_before_post_content' ); ?>
<div class="fl-post-content clearfix" itemprop="text">
<?php
the_content();
?>
</div><!-- .fl-post-content -->
@gstricklind
gstricklind / front-page.php
Last active March 5, 2019 02:16
Genesis Front Page Custom Loop Fix
<?php
add_action( 'genesis_after_entry', 'homepage_post_loop' );
function homepage_post_loop() {
global $wp_query;
global $paged;
$paged = get_query_var('page');
$args = array(
'posts_per_page' => 10,