Skip to content

Instantly share code, notes, and snippets.

View eci-chris's full-sized avatar

Chris Hubbard eci-chris

View GitHub Profile
@rniswonger
rniswonger / custom.css
Created October 28, 2020 22:54
Avada Theme: Equal height Content Boxes
/*
Add this code to the Avada Custom CSS.
Add the class "equal-height" to your Content Boxes Options container, not a single Content Box.
The editor preview will not show the change but reload the live page to see the results.
*/
.fusion-content-boxes.equal-height {
display: flex;
align-items: stretch;
flex-wrap: wrap;
@marklchaves
marklchaves / avada-equal-height-plain-columns.css
Created October 16, 2019 23:02
CSS Only Solution to Equal Height Columns in Avada by ThemeFusion (two plain columns with buttons)
/* For Avada by ThemeFusion */
/* The equal height problem is only an issue for larger devices. */
@media screen and (min-width: 1024px) {
/* Make the column content equal height. */
.your-classname-here .fusion-column-wrapper {
height: 440px !important; /* Adjust for your content. */
}
/* These CSS selectors depend on what Avada buttons you use. Note the button-2 class--change as needed. */
.fusion-button.button-flat.button-small.button-default.button-2.fusion-button-default-span.fusion-button-default-type {
@hmbashar
hmbashar / Avada Theme scripts handler.php
Created September 18, 2019 16:23
To build on what Michael C wrote, and based on another post that I came across (https://theme-fusion.com/forums/topic/related-posts-not-showing-on-post-pages/), I was able to put together a solution to this using the Avada Child Theme. I found that disabling Fusion Builder Elements in the Fusion Builder settings did not consistently remove the d…
<?php
add_action( 'wp_enqueue_scripts', 'custom_disable_theme_js' );
function custom_disable_theme_js() {
Fusion_Dynamic_JS::deregister_script('avada-comments');
Fusion_Dynamic_JS::deregister_script('avada-general-footer');
Fusion_Dynamic_JS::deregister_script('avada-mobile-image-hover');
Fusion_Dynamic_JS::deregister_script('avada-quantity');
Fusion_Dynamic_JS::deregister_script('avada-scrollspy');
Fusion_Dynamic_JS::deregister_script('avada-select');
@kimcoleman
kimcoleman / my_pmpro_membership_level_gadwp_analytics.php
Created January 16, 2019 17:52
Track membership level as Custom Dimension 1 (dimension1) in your Google Analytics tracking code.
<?php
/**
* Track membership level as Custom Dimension 1 (dimension1) in your Google Analytics tracking code.
*
* Requires Paid Memberships Pro and the Google Analytics Dashboard for WP by ExactMetrics (formerly GADWP) plugin.
*/
function my_pmpro_membership_level_gadwp_analytics( $gadwp ) {
$commands = $gadwp->get(); // Get commands array
@irishquinn
irishquinn / functions.php
Created December 15, 2018 01:16
avada-functions.php performance improvements - remove portfolio and faq cpt
<?php
// add to avada child theme functions.php
//async all js
function add_async_attribute($tag, $handle)
{
if ('my-js-handle' !== $handle)
return $tag;
return str_replace(' src', ' async="async" src', $tag);
}
add_filter('script_loader_tag', 'add_async_attribute', 10, 2);
@andrewlimaza
andrewlimaza / example-get-all-members-sql.sql
Created December 6, 2018 05:34
SQL to get all users with active membership level.
SELECT users.*, members.membership_id, level.name
FROM wp_users AS users
JOIN wp_pmpro_memberships_users AS members
ON users.ID = members.user_id
JOIN wp_pmpro_membership_levels AS level
ON members.membership_id = level.id
WHERE members.status = 'active'
@seothemes
seothemes / bbpress.scss
Created August 11, 2018 09:12
This is a quick, sassified version of the default bbPress stylesheet.
/**
* bbPress specific CSS
*
* @package bbPress
* @subpackage Theme
*/
/* =bbPress Style
-------------------------------------------------------------- */
<?php
/**
* Converts shortcode names from Fusion Core
* to a format that Fusion Builder will accept.
*
* @author ThemeFusion
* @copyright (c) Copyright by ThemeFusion
* @link http://theme-fusion.com
* @package Avada
* @subpackage Core
@andrewlimaza
andrewlimaza / pmpro_days_left_example.php
Last active June 11, 2024 14:28
Add days left to new membership level purchase for Paid Memberships Pro WooCommerce.
<?php
/**
* Calculate days remaining for current membership level and add it to new subscription.
* Only works for PMPro WooCommerce Integration
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
* www.paidmembershipspro.com
*/
function pmprowoo_add_days_to_level( $level_array ) {
$level_obj = pmpro_getLevel($level_array['membership_id']);
/* start new bbpress */
.bbp-topic-voice-count {
display: none;
}
.bbp-topic-reply-count {
color: #aaa;
font-size: 80%;
margin-right: 20px !important;
width: inherit !important;