Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

John Bunka JohnBunka

🎯
Focusing
View GitHub Profile
@JohnBunka
JohnBunka / fuctions.php
Created Feb 6, 2020
Fix images using CloudFlare hotlink protection and Beaver Builder
View fuctions.php
// The first URL is your actual URL. The second is your CDN url.
add_filter( 'fl_builder_render_css', function( $css ) {
$css = str_replace( 'https://pressavenue.com/', 'https://your.cdn.com/', $css );
return $css;
});
@JohnBunka
JohnBunka / functions.php
Created Mar 20, 2019
Link Font Awesome from hosted CDN
View functions.php
//enqueues our external font awesome stylesheet
function enqueue_our_required_stylesheets(){
wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/5.7.2/css/font-awesome.min.css');
}
add_action('wp_enqueue_scripts','enqueue_our_required_stylesheets');
@JohnBunka
JohnBunka / functions.php
Created Mar 20, 2019
Load Font Awesome Locally
View functions.php
//enqueues our locally supplied font awesome stylesheet
function enqueue_our_required_stylesheets(){
wp_enqueue_style('font-awesome', get_stylesheet_directory_uri() . '/css/font-awesome.css');
}
add_action('wp_enqueue_scripts','enqueue_our_required_stylesheets');
@JohnBunka
JohnBunka / functions.php
Created Mar 5, 2019
Cleanup URL in Beaver Builder for CSS Purposes - Press Avenue
View functions.php
//Beaver Builder - Replace your actual URL with the CDN URL for CSS purposes
// You would adjust the URLs to fit your URLs. The first URL is your actual URL. The second is your CDN url.
add_filter( 'fl_builder_render_css', function( $css ) {
$css = str_replace( 'https://pressavenue.com/', 'https://your-amazing-cdn-uwl-here.com/', $css );
return $css;
});
@JohnBunka
JohnBunka / posts.php
Last active Oct 2, 2019
Current Date Shortcode - Beaver Builder Theme
View posts.php
Shortcode Example
[fl_year] 2018
[fl_year format="y"] 18
[fl_year format=“F j, Y”] May 26, 2018
[fl_year format=“l, F j, Y”] Saturday, May 26, 2018
[fl_year format=“m-d-Y”] 05-25-2018
[fl_year format=“n-j-y”] 5-25-18
[fl_year format=“d.m.y”] 25.05.18
@JohnBunka
JohnBunka / posts.php
Created May 14, 2018
Beaver Builder Current Date Shortcode
@JohnBunka
JohnBunka / functions.php
Last active Apr 19, 2018 — forked from woogists/wc-remove-tabs.php
Remove the additional information tab only
View functions.php
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
function woo_remove_product_tabs( $tabs ) {
unset( $tabs['additional_information'] ); // Remove the additional information tab
return $tabs;
}
@JohnBunka
JohnBunka / functions.php
Created Apr 11, 2018
WooCommerce - Removing Tabs
View functions.php
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
function woo_remove_product_tabs( $tabs ) {
unset( $tabs['description'] ); // Remove the description tab
unset( $tabs['reviews'] ); // Remove the reviews tab
unset( $tabs['additional_information'] ); // Remove the additional information tab
return $tabs;
}
@JohnBunka
JohnBunka / functions-plugin.php
Created Oct 12, 2017
Move the Yoast SEO Meta Box to the Bottom of the edit screen in WordPress
View functions-plugin.php
/*-------------------------------------
Move the Yoast SEO Meta Box to the Bottom of the edit screen in WordPress
---------------------------------------*/
function yoasttobottom() {
return 'low';
}
add_filter( 'wpseo_metabox_prio', 'yoasttobottom');
@JohnBunka
JohnBunka / additional-or-custom-css.css
Last active Oct 2, 2017
How to create a fixed Top Bar Menu in Beaver Builder
View additional-or-custom-css.css
/*
Add this to the Additional CSS area in the customizer or to the style.css in your child theme - More info and help at www.PressAvenue.com
or on the blog post https://pressavenue.com/create-fixed-top-bar-menu-beaver-builder
*/
.fl-page-bar {
position: fixed;
width: 100%;
z-index: 999;
}
.fl-page-header-fixed {
You can’t perform that action at this time.