Link to Author archive from Navigation Menus in dashboard?

I don’t really understand why you want to use a menu to control this but it wouldn’t be very hard. First you obviously need a new page template for your grid which you will use get_users to pull your users for display – https://codex.wordpress.org/Function_Reference/get_users Now if you want to control the order and whom is … Read more

Custom Post Types posts as submenus in Nav Menu

Here’s an example on modifying a menu element to add things. In this example, a category item is extended to have a dynamically generated sub menu listing posts, where the menu item has a class of showposts-X where X is the number of posts to show: function menu_show_category_posts( $item_output=””, $item = ”, $depth=””, $args=”” ) … Read more

New post notification in wp_nav_menu

I would store a transient with a life-time of 24 hours when a post (in some category, I’m using category with ID 333 as an example) is published. Whenever subsequent posts are published, the transient is either updated or recreated if 24 hours has elapsed and the transient has been deleted. Logic Whenever a post … Read more

Add Dividers or Separators Between Nav Menu Items

Use a custom walker. Extend start_el() to print <li class=”menu_separator”><hr></li> if the menu title is just a ‘-‘. functions.php function wpse38241_setup_menu() { register_nav_menu( ‘main-menu’, ‘Main Menu’ ); } add_action( ‘after_setup_theme’, ‘wpse38241_setup_menu’ ); /** * Replaces items with ‘-‘ as title with li class=”menu_separator” * * @author Thomas Scholz (toscho) */ class Wpse38241_Separator_Walker extends Walker_Nav_Menu { … Read more

How to get IDs for objects in menu branch?

I am lazy to write supporting logic from scratch so I am reusing functions from linked answer on branches: /** * Retrieve IDs of posts in branch of menu. * * @param mixed $menu * @param string $branch_title * * @link http://wordpress.stackexchange.com/questions/2802/display-a-portion-branch-of-the-menu-tree-using-wp-nav-menu * * @return array */ function get_post_ids_from_menu_branch( $menu, $branch_title ) { $menu_object = … Read more

How do I add a search box to the nav menu?

Your code works perfectly for me as is. The only thing I can think of is that you have a searchform.php defined in your theme but it’s empty? (If searchform.php doesn’t exist in your theme, WP will use a default form.)

Display only page specific sub menu items using Custom Walker

Here is a much simpler implementation: class UL_Submenu_Walker extends Walker_Nav_Menu { private $hidden = false; function start_lvl(&$output, $depth) { if($depth == 0) { $style = $this->hidden ? “” : “display:none;”; } $output .= “<ul class=\”submenu-“.$depth.”\” style=””.$style.””>”; } function start_el(&$output, $item, $depth, $args) { $class_names = $value=””; $classes = empty( $item->classes ) ? array() : (array) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)