Skip to content

Instantly share code, notes, and snippets.

@secretstache
secretstache / current-menu-item.php
Last active Aug 29, 2015
Dynamically add current-menu-item to list items
View current-menu-item.php
<?php $story_nav = new WP_Query( $args ); ?>
<?php if ( ! empty( $story_nav ) ) { ?>
<?php $queried_object = get_queried_object(); ?>
<?php $current_page_id = $queried_object->ID; ?>
<ul class="featured-stories">
<li>Featured Stories
@secretstache
secretstache / gfm.php
Last active Jan 9, 2016
Genesis Markup for Foundation
View gfm.php
<?php
function ssfg_add_markup_class( $attr, $context ) {
// default classes to add
$classes_to_add = apply_filters ('ssfg-classes-to-add',
// default foundation markup values
array(
'site-header' => 'row',
'site-container' => 'inner-wrap',
'site-footer' => 'row',
'content-sidebar-wrap' => 'row',
You can’t perform that action at this time.