Skip to content

Instantly share code, notes, and snippets.

View GhostToast's full-sized avatar

Gustave F. Gerhardt GhostToast

View GitHub Profile
@GhostToast
GhostToast / mstar-menu-limit.php
Created December 3, 2013 17:15
Increase the posts per page in WordPress menu panel
<?php
/*
Plugin Name: Mstar Menu Limit
Description: Increase the posts per page in menu panel
Plugin URI: http://ghosttoa.st
Author: Gustave F. Gerhardt
Author URI: http://ghosttoa.st
License: GPL2
Version: .9
*/
@GhostToast
GhostToast / menu_loader_exploder.php
Last active December 19, 2015 03:09
Creates a dropdown menu from a WordPress Nav Menu. Useful for sitting alongside regular menu for use in responsive designs, or where there's no room for a regular menu. Gracefully nests.
<?php
$menu_name = 'topnav'; // or whatever menu you want
$locations = get_nav_menu_locations();
$menu = wp_get_nav_menu_object($locations[$menu_name]);
$menu_items = wp_get_nav_menu_items($menu->term_id, array( 'order' => 'DESC' ));
?>
<select class="the-selectors" onChange="document.location.href=this.options[this.selectedIndex].value;">
<option value="">Please Select</option>
<?php