Skip to content

Instantly share code, notes, and snippets.

View lizardking8610's full-sized avatar

Robert lizardking8610

View GitHub Profile
@lizardking8610
lizardking8610 / color-button.css
Created May 23, 2017 07:11 — forked from studiopress/color-button.css
Colored Content Boxes
/* Color Buttons
------------------------------------------------------------ */
.button-blue,
.button-gray,
.button-green,
.button-purple,
.button-red,
.button-yellow {
color: #fff;
@lizardking8610
lizardking8610 / functions.php
Created May 23, 2017 07:17 — forked from studiopress/functions.php
Load Google Fonts.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Enqueue Lato Google font
add_action( 'wp_enqueue_scripts', 'sp_load_google_fonts' );
function sp_load_google_fonts() {
wp_enqueue_style( 'google-font-lato', '//fonts.googleapis.com/css?family=Lato:300,700', array(), CHILD_THEME_VERSION );
}
@lizardking8610
lizardking8610 / media-queries.css
Created May 26, 2017 01:00 — forked from hemantajax/media-queries.css
Very useful media queries snippets
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
@lizardking8610
lizardking8610 / core.php
Created May 16, 2018 20:30 — forked from abijlani/core.php
The method within core.php of the JSON API plugin for Wordpress. The core.php file is located within "json-api/controllers"
public function get_recent_summary() {
global $json_api;
$posts = $json_api->introspector->get_posts();
$output = array();
foreach ($posts as $post){
$post_summary["id"] = $post->id;
$post_summary["url"] = $post->url;
$post_summary["title"] = $post->title;
$post_summary["date"] = $post->date;
// Register full-width content widget after default home page widgets
// This code is added to the end of your child themes functions.php file
/**
* @author Brad Dalton - WP Sites
*
* @link http://wpsites.net/web-design/add-widget-home-php-genesis/
*/
//This codes gets added to the home_genesis_meta add actions in the home.php file, around line 15
add_action( 'genesis_loop', 'agency_home_full_helper' );
//This code gets added to the end of the home.php file before the genesis() tag.
function agency_home_full_helper() {
if ( is_active_sidebar( 'full-content' ) ) {
echo '<div id="full-content">';
dynamic_sidebar( 'full-content' );
echo '</div><!-- end #full-content -->';
}
}
<?php
add_action( 'genesis_meta', 'agency_home_genesis_meta' );
/**
* Add widget support for homepage. If no widgets active, display the default loop.
*
* Link http://wpsites.net/web-design/add-widget-home-php-genesis/
*/
function agency_home_genesis_meta() {
@lizardking8610
lizardking8610 / acf-field-group-schema.json
Created May 9, 2019 22:12 — forked from friartuck6000/acf-field-group-schema.json
JSON schema for Advanced Custom Fields (ACF) field groups
{
"$schema": "http://json-schema.org/schema#",
"id": "http://advancedcustomfields.com/json-schema/field_group",
"type": "object",
"definitions": {
"empty": {
"type": "string",
"maxLength": 0
},
"intOrEmpty": {
add_action( 'wp_enqueue_scripts', 'generate_remove_fontawesome', 100 );
function generate_remove_fontawesome() {
wp_dequeue_style( 'fontawesome' );
}