Skip to content

Instantly share code, notes, and snippets.

@jonwaldstein
jonwaldstein / cf_page_builder.php
Created December 9, 2016 22:37
Carbon Fields Page Builder Add-on
<?php
use Carbon_Fields\Container;
use Carbon_Fields\Field;
use Carbon_Fields\Field\Complex_Field;
Container::make( 'post_meta', 'Page Builder' )//PAGE BUILDER FIELDS
->show_on_post_type('page')
->add_fields( array(
Field::make( 'complex', 'crb_layouts' )
->set_layout('tabbed-vertical')
@carasmo
carasmo / asynchronous-facebook-like-box.html
Created February 28, 2017 16:35
Non blocking asynchronous Facebook Like box
<!--
Remove the FB like box script from your header and modify the following for your use.
Then place it in your html (like a widget area) where you want it to appear.
-->
@carasmo
carasmo / put-primary-sidebar-in-secondary-location-css.css
Last active March 6, 2017 11:18
Genesis Swap Put Primary Sidebar into Secondary Sidebar location (it's better to use CSS for this)
/* CSS is best and forget the php : see image in the comments. This is only partial css for that layout. */
@media (min-width: 1200px) {
/* ## sidebar-content-sidebar
--------------------------------------------- */
.sidebar-content-sidebar .content-sidebar-wrap {
width: 80%;
@jdelia
jdelia / custom-style.css
Last active October 14, 2017 03:11
Code snippets for a video lightbox with image thumbnail.
.lightbox-video {
margin: auto;
padding: 5% 10%;
}
.lightbox-video a {
display: block;
position: relative;
overflow: hidden;
cursor: pointer;
@patric-boehner
patric-boehner / wp-config.php
Last active April 22, 2018 00:57
WP Config Sample
<?php
/**
* This will log all errors notices and warnings to a file called debug.log in
* wp-content (If Apache does not have write permission, you may need to create
* the file first and set the appropriate permissions (i.e. use 660) )
*/
define( 'WP_DEBUG', false ); // Or false
if ( WP_DEBUG ) {
define( 'WP_DEBUG_LOG', true );
@topleague
topleague / google-fonts-wordpress.js
Created December 14, 2017 14:22
Install Google Fonts without Rendering Blocking
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js"></script>
<script>
WebFont.load({
google: {
families: ['Source+Serif+Pro:400,600,700']
}
});
</script>