Skip to content

Instantly share code, notes, and snippets.

@ianthompson
ianthompson / bb-hide-page-title.css
Created August 29, 2016 08:30
Hide th Beaver Builder page title
header.fl-post-header {
display: none;
}
@ianthompson
ianthompson / bb-header.css
Created August 29, 2016 08:16
Adjust Beaver Builder Header column widths
@media (min-width: 768px) {
.fl-page-header-primary .row > div:first-child {
width: 70%;
}
.fl-page-header-primary .row > div:last-child {
width: 30%;
}
}
.fl-builder img {
max-width: 100%;
<i class="fa fa-bell-o" aria-hidden="true"></i>
@ianthompson
ianthompson / bb-shortcode-id
Created July 18, 2016 07:34
Shows a Beaver Builder template using the templates ID
[fl_builder_insert_layout id="123"]
@ianthompson
ianthompson / bb-shortcode-slug
Last active July 18, 2016 08:35
Shows a beaver Builder template using the templates slug
[fl_builder_insert_layout slug="my-post-slug"]
@ianthompson
ianthompson / wp-jpg-compression
Created July 10, 2016 16:00
Alter WordPress jpg compression by adding this to your functions.php file
add_filter( ‘jpeg_quality’, create_function( ”, ‘return 100;’ ) );
@ianthompson
ianthompson / additional-images.php
Last active July 10, 2016 15:37
Create additional images in WordPress
add_image_size( 'sidebar', 120, 120, true ); // Hard Crop Mode
add_image_size( 'homepage', 220, 180 ); // Soft Crop Mode
@ianthompson
ianthompson / single-distributors.php
Created July 9, 2016 10:13
Adjusted Beaver Builder single.php theme file to display custom posts types.
<?php
/*
Template Name: Distributors
*/
?>
<?php get_header(); ?>
<div class="container">
<div class="row">
<?php
$show_thumbs = FLTheme::get_setting('fl-posts-show-thumbs');
?>
<article <?php post_class( 'fl-post' ); ?> id="fl-post-<?php the_ID(); ?>" itemscope itemtype="http://schema.org/BlogPosting">
<?php if(has_post_thumbnail() && !empty($show_thumbs)) : ?>
<?php if($show_thumbs == 'above-title') : ?>
<div class="fl-post-thumb">