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-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>
# Error Message:
#
# Access to Font at '...' from origin '...' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header
# is present on the requested resource. Origin '...' is therefore not allowed access.
#
# --------------------------------------
<IfModule mod_headers.c>
<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
@carlosonweb
carlosonweb / bb-bg-image-cdn.php
Created August 8, 2017 22:03
Fix BB Background Image not fetching from CDN
function fl_builder_rewrite_cdn_urls( $css ) {
return str_ireplace( 'example.com', 'example-5782.kxcdn.com', $css );
}
add_filter( 'fl_builder_render_css', 'fl_builder_rewrite_cdn_urls' );
@carlosonweb
carlosonweb / post-top-meta.php
Last active August 28, 2017 03:17
Beaver Builder Customer Request: Modify the Schema Object for the author by removing the author URI
<?php
if( !function_exists('bblocal_post_schema_meta')){
// Copied from FLTheme::post_schema_meta();
// This function is invoked at the last line of this file.
function bblocal_post_schema_meta()
{
// General Schema Meta
echo '<meta itemscope itemprop="mainEntityOfPage" itemid="' . get_permalink() . '" />';
echo '<meta itemprop="datePublished" content="' . get_the_time('Y-m-d') . '" />';
echo '<meta itemprop="dateModified" content="' . get_the_modified_date('Y-m-d') . '" />';