Instantly share code, notes, and snippets.
GhostToast
/ mstar-menu-limit.php
Created
December 3, 2013 17:15
Increase the posts per page in WordPress menu panel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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
/ 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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 |
NewerOlder