Skip to content

Instantly share code, notes, and snippets.

Nick Croft NicktheGeek

Block or report user

Report or block NicktheGeek

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View style.css
@media only screen and (min-width: 1101px) {
.nav-primary {
text-align: center;
.nav-primary .wrap {
display: inline-block;
width: auto !important;
NicktheGeek / functions.php
Created Dec 3, 2018
Add tota11y to WP Theme using WP_DEBUG
View functions.php
* Theme functions.php file.
* This file adds functions to the {theme}.
* @package nls
* @author NicktheGeek
* @license GPL-2.0+
* @link
NicktheGeek / conditional-actions.php
Created Jan 18, 2013
Sometimes you need to add or remove actions conditionally. here is a simple bit of code that allows this to be done within the functions.php file instead of requiring multiple template files.
View conditional-actions.php
add_action( 'genesis_before', 'child_conditional_actions' );
function child_conditional_actions() {
if( /**insert your conditional statements here */ ) {
//put your actions here
//you could add additional conditional statements as needed here
NicktheGeek / agentpress.php
Created Jan 10, 2013
Change AgentPress feature listing widget output
View agentpress.php
add_filter( 'agentpress_featured_listings_widget_loop', 'child_featured_listings_widget_loop' );
* This code will replace the "," left behind in AgentPress feature listing widget after
* the listing detail IDs have been changed.
* Change the IDs to suit your needs.
function child_featured_listings_widget_loop( $loop ){
NicktheGeek / subnav-left-sidebar.php
Last active Dec 10, 2015
Ever wanted to add a widget area before the .menu <ul> of the Genesis menus? With this simple gist you can do just that. Included are some comments to allow you to change it to use the primary menu or move the widget area to after the </ul> of the .menu. This gist assumes you have made a sidebar with the ID "subnav-left"
View subnav-left-sidebar.php
//You could use genesis_do_nav to target the primary menu
add_filter( 'genesis_do_subnav', 'child_do_subnav_widget', 10, 2 );
/** Adds widget area before the .menu on #subnav */
function child_do_subnav_widget( $subnav_output, $subnav ){
genesis_widget_area( 'subnav-left', array(
'before' => '<div class="subnav-left widget-area">',
'after' => '</div>', //required for HTML5 enabled themes
) );
You can’t perform that action at this time.