Skip to content

Instantly share code, notes, and snippets.

Carlos Velasco carlosonweb

Block or report user

Report or block carlosonweb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@carlosonweb
carlosonweb / themer-custom-field.php
Last active Jul 31, 2019
Sample Code to Customize Themer Connection Field
View themer-custom-field.php
<?php
/**
*
* This is a stripped down code based on the sample in this doc:
*
* https://kb.wpbeaverbuilder.com/article/391-customize-field-connections-themer
*
*/
add_action( 'fl_page_data_add_properties', function() {
@carlosonweb
carlosonweb / class-fl-child-theme.php
Created Jun 7, 2019
BB Ticket 82857 -- Change Widget Title Hx Tag (Default tag in the BB Parent Theme is h4)
View class-fl-child-theme.php
<?php
/**
* Helper class for child theme functions.
*
* @class FLChildTheme
*/
final class FLChildTheme {
/**
@carlosonweb
carlosonweb / collapse-bb-tabs.js
Created Jun 6, 2019
Collapse the All Tab on Beaver Builder Tabs Module When Viewed on Small Screen
View collapse-bb-tabs.js
jQuery( window ).on('resize', function() {
var $ = jQuery;
if ( $(window).width() <= FLBuilderLayoutConfig.breakpoints.small ){
$( '.bbtest-tabs .fl-tabs-panel .fl-tabs-label[data-index=0] i' ).addClass( 'fa-plus' );
$( '.bbtest-tabs .fl-tabs-panel .fl-tabs-panel-content[data-index=0] ').hide();
$( '.bbtest-tabs .fl-tabs-panel .fl-tabs-label[data-index=0]' ).removeClass( 'fl-tab-active' );
$( '.bbtest-tabs .fl-tabs-panel .fl-tabs-panel-content[data-index=0] ').removeClass( 'fl-tab-active' );
}
@carlosonweb
carlosonweb / bb-smooth-scrolling.js
Last active Sep 20, 2019
Code Tweaks for Beaver Builder Smooth Scrolling
View bb-smooth-scrolling.js
/**
*
* Tweak the code here:
*
* https://kb.wpbeaverbuilder.com/article/634-smooth-scrolling-tweaks-with-code
*
* to make it work when the anchor link is coming from another page.
*
*/
@carlosonweb
carlosonweb / fl_builder_loop_query_args-filter.php
Last active Jan 2, 2019
TEC vs Post "fl_builder_loop_query_args" Filter Hook
View fl_builder_loop_query_args-filter.php
<?php
/**
*
* This works on regular post type.
*
*/
add_filter( 'fl_builder_loop_query_args', function( $query_args ){
$today = date( 'Y-m-d H:i:s', time() );
if ( is_page( 'display-past-events' ) && ( 'bbtest-posts-past-events' === $query_args[ 'settings' ]->id ) ) {
@carlosonweb
carlosonweb / beaver-themer-wc-notices.php
Created Dec 14, 2018
Move the WooCommerce Notices on the Beaver Themer Singular Product Layout to Anywhere on the layout via a Custom Shortcode
View beaver-themer-wc-notices.php
/**
* First, remove WooCommerce Notices box from its default location on the page (somewhere at the top).
*/
remove_filter( 'fl_theme_builder_before_render_content', 'FLThemeBuilderWooCommerceSingular::before_render_content' );
/**
* Create this shortcode : [fl_woocommerce_notices]
* You can embed this anywhere on the Themer Layout via the HTML module.
*/
add_shortcode( 'fl_woocommerce_notices', function() {
@carlosonweb
carlosonweb / class-fl-child-theme.php
Last active Dec 12, 2018
Better BB Child Theme Helper Class
View class-fl-child-theme.php
<?php
/**
* Helper class for child theme functions. This is a better version as it uses the child theme's version number.
*
* @class FLChildTheme
*/
final class FLChildTheme {
/**
* Enqueues scripts and styles.
@carlosonweb
carlosonweb / bb-wp-all-import.php
Created Oct 17, 2018
Fix WP All Import Problem
View bb-wp-all-import.php
<?php
/**
* Add the code to All Import > Settings > Function Editor.
*/
function clear_bb_cache_after_wpai_import($import_id) {
FLBuilderModel::delete_asset_cache_for_all_posts();
}
add_action( 'pmxi_after_xml_import', 'clear_bb_cache_after_wpai_import', 10, 1);
@carlosonweb
carlosonweb / bb-smooth-scrolling-bottom.php
Last active Oct 5, 2018
BB Smooth Scrolling Code Tweak Loaded At the Bottom of the Page
View bb-smooth-scrolling-bottom.php
/**
*
* It's essentially the same code here:
* https://kb.wpbeaverbuilder.com/article/634-smooth-scrolling-tweaks-with-code
*
* I'm just using "wp_footer" action hook to load the code to the bottom of the page (see priority = 999).
* You need to change 'page-slug-here' in LINE 10 to correspond with the target page.
*
*/
add_action ( 'wp_footer', function(){
@carlosonweb
carlosonweb / bb-smooth-scroll.js
Created Oct 2, 2018
Beaver Builder Smooth Scrolling From Another Page
View bb-smooth-scroll.js
/**
*
* Smooth Scrolling from another page.
* To be paired with this code:
* https://kb.wpbeaverbuilder.com/article/634-smooth-scrolling-tweaks-with-code
*
*/
jQuery(document).ready(function($) {
var hashLink = $(window.location.hash),
offsetSize = $("header").innerHeight() + 40;
You can’t perform that action at this time.