Position image widget in mega menu
I your mega menu, search for alignment option to align the widget. Alternatively, you may need CSS to manually override the positioning. How exactly would you like it to display, maybe I can help?
I your mega menu, search for alignment option to align the widget. Alternatively, you may need CSS to manually override the positioning. How exactly would you like it to display, maybe I can help?
In your Walker_N_Menu class’s start_lvl() method, you’re setting the <ul>‘s id to submenu1. You can change this (using, in this example, the $depth parameter passed to start_lvl()) to be unique: function start_lvl( &$output, $depth = 0, $args = array() ) { // Depth-dependent classes. $indent = ( $depth > 0 ? str_repeat( “\t”, $depth ) … Read more
How do I add recent posts to the menu?
Trying to Create Menu in WordPress
You need to target the appropriate theme_location. Assuming you’ve defined multiple nav menu locations using register_nav_menus() in functions.php: <?php register_nav_menus( array( ‘primary-menu’ => ‘Primary Menu’, ‘secondary-menu’ => ‘Secondary Menu’ ) ); ?> Then you call wp_nav_menu() using the appropriate theme_location as defined above, along with any other relevant arguments, e.g.: <?php wp_nav_menu( array( ‘theme_location’ => … Read more
You can add an interal link quite easily, it’s the same approach you use for adding custom items, you simply exclude a callback function and set the menu slug to the applicable URL, here’s an example. add_action( ‘admin_menu’, ‘add_user_type_link’ ); function add_user_type_link() { add_submenu_page( ‘users.php’, ‘Customers’, ‘Customers’, ‘edit_users’, ‘users.php?role=customers’ ); } Adjust the code as … Read more
I asked a similar question and got this answer, to query the DB for attachments and dump them into a list. This was the code that was provided to me: $media_query = new WP_Query( array( ‘post_type’ => ‘attachment’, // get attachments only ‘post_status’ => ‘inherit’, // attachments are not ‘published’, so set it to inherit … Read more
Your best bet if you want them to show using the default drag and drop function is to register a custom taxonomy for the custom post type, http://codex.wordpress.org/Function_Reference/register_taxonomy. You can also use the taxonomies parameter when you register your CPT function. http://codex.wordpress.org/Function_Reference/register_post_type The alternative is to make a custom filter for your nav menu that … Read more
https://gist.github.com/3853924 This is a plugin I created and usually use for this type of functionality. The key is the little function down at the bottom of the file that searches for the top-level ancestor. There’s also part of the code that will print out categories instead of pages when you’re on a blog or search … Read more
First, be sure your theme supports wp_nav_menu which is goes into a template file – such as header.php – with the template tag function <?php wp_nav_menu( $args ); ?> which also requires a function in functions.php. See http://codex.wordpress.org/Function_Reference/wp_nav_menu That will initiate the WordPress 3 menu system that will appear in Dashboard>>Appearance>>Menus Next, read http://codex.wordpress.org/WordPress_Menu_User_Guide on … Read more