Skip to content

Instantly share code, notes, and snippets.

View shrinkray's full-sized avatar
:octocat:
Focusing

Greg Miller shrinkray

:octocat:
Focusing
View GitHub Profile
@shrinkray
shrinkray / Custom_Walker_Nav_Menu.php
Created December 23, 2019 02:13 — forked from gregrickaby/Custom_Walker_Nav_Menu.php
Add HTML Markup to WordPress Nav Menu Editor
<?php
/**
* Create HTML list of nav menu items.
*
* @since 3.0.0
* @uses Walker
*/
class Custom_Walker_Nav_Menu extends Walker_Nav_Menu {
/**
@shrinkray
shrinkray / functions.php
Created December 22, 2019 03:13
Add a data attribute of page/post to a WordPress Menu ( wp_nav_menu() )
/**
* Add a data attribute of page/post to a WordPress Menu
* Add this to your functions.php file
*
* This function will add the page/post ID of item the menu links to
* when using wp_nav_menu(); to build the menu.
*
* Example:
*
@shrinkray
shrinkray / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console