Skip to content

Instantly share code, notes, and snippets.

View carlosonweb's full-sized avatar

Carlos Velasco carlosonweb

View GitHub Profile
/**
* File: wp-config.php file.
*
* Take note of the comment line below.
* This code should be placed above that line.
*
*/
define('WP_HOME', 'http://tmp.example.com');
define('WP_SITEURL', 'http://tmp.example.com');
@carlosonweb
carlosonweb / gist:a4e43b6f3ca1b885b5bc82e090bb8647
Last active April 7, 2017 03:34
Remove Font Awesome from Beaver Builder Theme
<?php
//
// Remove Font Awesome reference from Beaver Builder Theme
// ---------------------------------------------------------
add_action( 'wp_enqueue_scripts', function(){
wp_dequeue_style( 'font-awesome' );
wp_deregister_style( 'font-awesome' );
}, 100 );
@carlosonweb
carlosonweb / gist:61399138fad9f736dfbfa4541231f33a
Created May 30, 2017 23:39
On Beaver Builder -- Set 1x4 row to 2x2 on mobile
@media (max-width: 768px){
/* 1. Float left all cols */
.high-octane-icons-row .fl-col-group .fl-col-small{
clear: none;
float: left;
}
/* 2nd Elem -- clear none */
.high-octane-icons-row .fl-col-group .fl-col-small:nth-child(2){
@carlosonweb
carlosonweb / bb-sidebar-template.php
Last active June 9, 2017 22:24
BB Test Sidebar
<?php
/*
Template Name: BB Test Sidebar
Template Post Type: post, page
*/
get_header();
?>
@carlosonweb
carlosonweb / bb-scrolling-menu-bar.js
Last active June 16, 2017 03:49
Beaver Themer Scrolling Menu Bar.
/**
*
* Following CSS may be needed
* -----------------------------
#header-scrolling-menu {
opacity: 1.0 !important;
index: 10;
}
@carlosonweb
carlosonweb / bb-page-builder-check.js
Last active February 1, 2019 05:53
Using JavaScript to test if Beaver Builder Page Editor is active on a page or layout. This is useful if you to run a JavaScript Code on live page and not run it inside the Page Builder Editor --- or vice-versa, of course. :-)
jQuery(document).ready(function($){
if( typeof window.FLBuilderConfig === 'undefined' || window.FLBuilderConfig === null ) {
// You are on a live page!
// Rest of the code here;
}
});
@carlosonweb
carlosonweb / search.php
Last active October 2, 2019 11:26
Custom Search Results Page for Beaver Builder Child Theme
/**
*
* BB Theme Search Results Page with no sidebars.
* I added as well the ID = "bb-custom-search-result" so you can apply custom CSS to it.
*
* Try the CSS below, for example, to remove the right border and increase the width of the search results content.
*
* @media (min-width: 992px){
* #bb-custom-search-result{
* border: none;
@carlosonweb
carlosonweb / list-active-plugins.js
Last active October 16, 2017 21:07
List active WP plugins. This is useful in troubleshooting a WP site for plugin conflicts.
jQuery( '.plugin-title > strong' ).each( function () {
console.log( jQuery(this).text() );
} );
@carlosonweb
carlosonweb / bb-toolset-views.html
Created July 12, 2017 21:34
Toolset Meets BB -- Sample Result
<div class="fl-builder-content fl-builder-content-1003" data-post-id="1003"><div class="fl-row fl-row-fixed-width fl-row-bg-none fl-node-58f60c7d3a748 bb-view-row" data-node="58f60c7d3a748">
<div class="fl-row-content-wrap">
<div class="fl-row-content fl-row-fixed-width fl-node-content">
<div class="fl-col-group fl-node-59668e8d05571" data-node="59668e8d05571">
<div class="fl-col fl-node-59668e8d05659" data-node="59668e8d05659">
<div class="fl-col-content fl-node-content">
<div class="fl-module fl-module-heading fl-node-59668e8d054ce bb-view-headline" data-node="59668e8d054ce">
<div class="fl-module-content fl-node-content">
<h3 class="fl-heading">
@carlosonweb
carlosonweb / bb-no-ace-editor.php
Created August 2, 2017 00:03
Remove the Ace Editor in the BB Theme's Customizer Area
add_action( 'customize_controls_print_scripts', function(){
?>
<style id='no-ace-editor-style'>
#customize-control-fl-js-code textarea,
#customize-control-fl-head-code textarea,
#customize-control-fl-header-code textarea,
#customize-control-fl-footer-code textarea{
display: block !important;
}
</style>