Skip to content

Instantly share code, notes, and snippets.

@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>
@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 );
@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;
@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%;
@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.
-->
@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')
@ControlledChaos
ControlledChaos / README.md
Last active January 9, 2019 15:47
Turns the WordPress Menus and Widgets links in the admin menu into top-level menu items.

Move Menus & Widgets

WordPress Snippet

@patric-boehner
patric-boehner / functions.php
Last active September 23, 2022 02:55
Removing in-post settings for the Genesis Framework, including seo, layout and scripts.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
/*
* You can find the refrance for supports that Genesis adds
* in the core files lib > admin > inpost-metaboxes.php
*/
//* Remove Action
@patric-boehner
patric-boehner / a-shortcode-ui.php
Last active August 30, 2016 19:26
A Shortcake UI example adding an editable button (cta) into body content in wordpress.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//**********************************************
// Setup CTA Button Widget
//**********************************************
/*
* We have three attributes:
* - Button Text
@carasmo
carasmo / paginate-comments-in-genesis.php
Created July 14, 2016 19:43
Paginate Comments/Discussion in Genesis Child theme.
<?php
// don't use above. Put this in your functions.php file.
/** ======================================================================================
*
* Paginate Comments
*
======================================================================================= */
function yourprefix_paginate_comments() {