Skip to content

Instantly share code, notes, and snippets.

View gbissland's full-sized avatar

Gareth Bissland gbissland

View GitHub Profile
@neilgee
neilgee / bb-col-click.js
Last active October 2, 2019 11:13
Beaver Builder Wrap Column in Link Tag with jQuery
(function($){
$(function() {
clickColumn();
});
/*
* Make a BeaverBuilder Column clickable.
@kellenmace
kellenmace / get-beaver-builder-modules-on-page.php
Last active October 21, 2023 04:17
Get a list of all the Beaver Builder modules on a page
<?php
/**
* Class for getting a list of Beaver Builder modules.
*/
class KM_Beaver_Builder_Module_List {
/**
* Get the list of Beaver Builder modules.
*
* @param int $post_id The post ID. Default is the current post being
@psahalot
psahalot / off-canvas-search.php
Last active November 18, 2018 22:27
add search box to off-canvas menu
// Advanced Menu - off-canvas before menu items
function wpba_demo_offcanvas_menu_before( $type, $settings, $id ) { ?>
<style>
.wpba-menu-content { margin-top: 50px; padding: 40px; padding-bottom: 10px; }
</style>
<div class="wpba-menu-content">
<div class="wpba-menu-search">
<?php echo get_search_form(); ?>
</div>
<h3>About us</h3>
<?php
function fl_builder_loop_query_args_filter( $query_args ) {
if ( 'example-module' == $query_args['settings']->id ) {
$query_args['ignore_sticky_posts'] = false;
}
return $query_args;
}
add_filter( 'fl_builder_loop_query_args', 'fl_builder_loop_query_args_filter' );
@justinswelch
justinswelch / beaverbuilder-random-layout-shortcode.php
Created August 10, 2018 00:50
Shortcode that displays a random saved BB layout on each page refresh.
<?php
/**
* Plugin Name: PXB - Random Beaver Layouts
* Description: Show random saved layouts in BB with shortcode
* Version: 1.0
* Author: Pixablaze
* Author URI: https://www.pixablaze.com
*/
/*----------------------------------------------------------
@andrewlimaza
andrewlimaza / gravity-forms-pre-populate-membership-level-pmpro.php
Last active June 25, 2020 18:59
Prepopulate Gravity Forms field with Paid Memberships Pro Membership Level ID.
<?php
/**
* Example on how to auto-populate a Gravity Form Field "membership_level" with the user's current membership level for Paid Memberships Pro.
* If user is not logged-in or doesn't have a membership level leave it blank.
* Adjust the 'gform_field_value_membership_level' name to match that of your field name parameter name.
*/
function my_auto_populate_gforms_pmpro_level( $value ) {
if ( ! defined( 'PMPRO_VERSION' ) || ! is_user_logged_in() ) {
@Pross
Pross / functions.php
Created July 17, 2018 15:28
Font Awesome Five.
add_action( 'wp_enqueue_scripts', function() {
wp_enqueue_style( 'font-awesome-5' );
} );
@psahalot
psahalot / layout-style.css
Created June 7, 2018 06:42
Content Grid Custom Layout CSS
.pp-content-grid-post {
font-size: 14px;
}
.pp-content-grid-post-image {
padding: 0;
position: relative;
}
.pp-content-grid-post-image a img {
filter: saturate(1.6) contrast(1.1);
opacity: 1;
@badabingbreda
badabingbreda / row_blur.js
Last active February 3, 2022 20:34
Snippet of code to change the row background-image to a blurred out version (or other filter effect)
// rowblur.js for Beaver Builder rows
// (c) 2018 Didou Schol / BadabingBreda
// rowblur.js may be freely distributed under the MIT license.
//
// add 'blureffect' as a class to the row and set the background-type to 'image'
// copy the code below into the "Global Settings > Javascript" tab and the rest will follow
// blur effect is hidden on fl_builder page, and needs a reload after page is saved.
// When normally browsing the site loads normally.
(function($) {
<?php
/*
Plugin Name: Change Genesis Portfolio Pro settings
Plugin URI: https://www.damiencarbery.com
Description: Change the settings for the Genesis Portfolio Pro CPT.
Author: Damien Carbery
Version: 0.1
*/