Skip to content

Instantly share code, notes, and snippets.

View fernandiez's full-sized avatar

Fernan fernandiez

View GitHub Profile
@JanHoek
JanHoek / font-awesome-menu.css
Last active February 23, 2017 13:03
Add Font Awesome Icons to the Genesis Menus
/*
Font Awesome Primary Menu
---------------------------------------------------------------------------------------------------- */
.genesis-nav-menu a {
line-height: 1;
padding-left: 30px;
color: #fff;
}
@neilgee
neilgee / category-tag.php
Last active August 29, 2015 14:00
Add Category Heading to Each Page in Pagination in Genesis
<?php
//do not copy the opening php tag above
/**
* Add Category and Tag Heading to Each Page in Pagination
*
* @package Category and Tag Headings on all archive pages
* @author Neil Gee
* @link http://coolestguidesontheplanet.com/displaying-category-headings-category-archive-pages-genesis/
* @copyright (c) 2014, Neil Gee
@neilgee
neilgee / set-sidebar-simple-sidebar-conditionally-genesis.php
Last active January 28, 2018 09:11
Set sidebar conditionally to target tags, categories and posts in Genesis.php
<?php
//do not copy the above opening php tag
add_action( 'genesis_before_sidebar_widget_area', 'themeprefix_remove_sidebar' ); // starts the ball rolling
/**
* Conditionally Change Sidebar in Genesis whilst using Simple Sidebars
*
* @package Genesis Sidebar with Simple Sidebar Switcheroo
* @author Neil Gee
* @link https://wpbeaches.com/bulk-set-sidebar-categories-tags-simple-sidebars-installed-genesis/
@bawright
bawright / page_contact.php
Created March 4, 2014 23:23
ACF Page Template
<?php
/*
Template Name: Contact
*/
//* Add custom body class of "contact" to the head
add_filter( 'body_class', 'odg_body_class' );
function odg_body_class( $classes ) {
@srikat
srikat / front-page.php
Last active September 21, 2017 14:25
Front Page Template to show CPT entries in a 3-column grid in Genesis. http://sridharkatakam.com/front-page-template-show-cpt-entries-3-column-grid-genesis/
<?php
/**
* To display entries from a Custom Post Type on site's front page in a 3-column responsive grid.
* URL: http://sridharkatakam.com/front-page-template-to-show-cpt-entries-in-a-3-column-grid-in-genesis/
*/
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'sk_do_loop' );
/**
@studiopress
studiopress / color-button.css
Last active January 31, 2021 13:48
Colored Content Boxes
/* Color Buttons
------------------------------------------------------------ */
.button-blue,
.button-gray,
.button-green,
.button-purple,
.button-red,
.button-yellow {
color: #fff;
/**
* Add a slider to the home page, if there is one to add
*
* @link http://blackhillswebworks.com/?p=4986
*/
add_action( 'genesis_before_content', 'metro_home_add_soliloquy_slider' );
function metro_home_add_soliloquy_slider() {
<?php
add_action( 'genesis_entry_content', 'theme_prefix_address' );
/**
*
* Display an address using
* Genesis column classes and ACF.
*
* @author Angie Meeker
* @uses Advanced Custom Fields
*/
@spigotdesign
spigotdesign / gist:5980046
Created July 11, 2013 22:54
Tribe Events WP_Query for today's events
<?php $current_date = date("Y-m-d H:i:s"); ?>
<?php $efeed = new WP_Query( array(
'post_type' => 'tribe_events',
'showposts' => 10,
'eventDisplay' => 'custom',
'start_date' => $current_date,
'end_date' => $current_date
));
?>
@studiopress
studiopress / columns.css
Last active July 23, 2024 20:27
Genesis column classes.
/* Column Classes
Link: http://twitter.github.io/bootstrap/assets/css/bootstrap-responsive.css
--------------------------------------------- */
.five-sixths,
.four-sixths,
.one-fourth,
.one-half,
.one-sixth,
.one-third,