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
/* ========================================================================== | |
Memberpress: Add a Sub Account Tab to the Account page | |
========================================================================== */ | |
function gs_mepr_add_some_tabs($user) { | |
$sub_accounts_active = (isset($_GET['action']) && $_GET['action'] == 'manage_sub_accounts')?'mepr-active-nav-tab':''; | |
$transactions = $user->active_product_subscriptions('transactions'); |
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
/* ========================================================================== | |
Corporate Account: Sub Account Shortcode Link | |
========================================================================== */ | |
//[manage_sub_accounts] | |
// Based off of: https://gist.github.com/cartpauj/e8299ab1f73257b9512b8a21c07462b4 | |
add_shortcode( 'manage_sub_accounts', 'gs_manage_sub_accounts'); | |
function gs_manage_sub_accounts(){ | |
$user = MeprUtils::get_currentuserinfo(); | |
if($user !== false) { |
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
//https://ginastricklind.com/how-to-add-write-your-review-link-to-woocommerce-product-page/ | |
(function($){ | |
$('.woocommerce-product-rating .woocommerce-review-link').after(' | <a class="write-your-review" href="#tab-reviews">Write Your Review</a>'); | |
$('.write-your-review').click( function () { | |
$('.tabs li').removeClass('active'); | |
$('.woocommerce-Tabs-panel').attr("style", "display:none"); |
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
/*======================================================================== | |
3 Column Reviews shortcode - can only be used on single product pages | |
https://ginastricklind.com/how-to-create-a-product-reviews-shortcode-query/ | |
========================================================================*/ | |
add_shortcode( 'display_latest_reviews', 'gs_display_latest_reviews' ); | |
function gs_display_latest_reviews() { | |
if( is_product() ) { | |
global $product; | |
$id = $product->id; |
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_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, |
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 | |
////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 --> |
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 | |
//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 |
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
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; | |
} |
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
// 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' ); |
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
/* change social icons */ | |
.fl-social-icons .fa-stack i:first-child { | |
display: none; | |
} | |
.fl-social-icons .fa-stack i:nth-child(2) { | |
color: inherit; | |
} |
NewerOlder