Articles of navigation

Display Menu Navigation Label

How to get Navigation Label as should be of the menu I’m using this code <?php $locations = get_registered_nav_menus(); $menus = wp_get_nav_menus(); $menu_locations = get_nav_menu_locations(); $location_id = ‘footer_menu1’; if (isset($menu_locations[ $location_id ])) { foreach ($menus as $menu) { if ($menu->term_id == $menu_locations[ $location_id ]) { echo ‘<h2>’.$menu->name.'</h2>’; // Get the items for this menu $menu_items […]

Nav-Menu not showing up

I would love for somebody to please help me because somewhere I am really miss understanding what WordPress is telling me. Alright so within my header.php I have the following code. <div class=”navigation navigation-top” id=”menu-nav”> <?php wp_nav_menu( array( ‘theme_location’ => ‘main-menu’ ) ); ?> <li><a href=””>Home</a> <ul> <li><a href=””></a></li> </ul> </li> <li class=”menu-search”><form method=”get” class=”form-search” […]

How can I add a fixed vertical menu to my site?

I’d like to have a vertical (secondary) menu on some sub-pages of my site. It should be fixed (will stay as the viewer scrolls down the screen). I’m currently using the Q2W3 fixed widget, but it lacks the customization options I’m looking for…wondering what other options are out there?

Ecommerce Single Product Next Product Link

I have tried using the default wp next and previous link but when click it would go to another category post instead of the next post(product) previous_post(‘&laquo; &laquo; %’, ‘previous’, ‘yes’); next_post(‘% &raquo; &raquo; ‘, ‘next’, ‘yes’); when i try to put yes for the same category, the previous and next title disappears previous_post(‘&laquo; &laquo; […]

Mobile navigation is shown, but standard navigation does not disappear

I have setup that website and the mobile navigation kicks in, as soon as the screen is smaller than 800 px wide. So far, so good. My problem is, the standard navigation does not disappear. That means, I have now the same navigation twice. Once in ugly broken words, once in the mobile button […]

Current author archive in navigation menu

I want logged-in user see her/his own author archive page link in top navigation menu,say (a link to a list of all her/his posts). What I achieved so far is this: function my_nav_menu_author_link( $menu ) { if( !is_user_logged_in() ){ return $menu; }else{ $link = get_author_posts_url( get_current_user_id() ); $author_archive_link = ‘<li>’ . ‘<a href=”‘ . $link […]

WordPress functions.php does not affect the theme menus

I am trying to customize my pre bought theme. What i try is, to have different menus for each page without using a plugin. Original theme has a function about navigation which uses walker class. here is the file in the original.entrepreneur theme. I use Entrepreneur Child Theme. I want to use primary navigation […]

How to reverse post navigation at bottom of post

I am using a child theme derived from twentythirteen. I wanted to have my posts displayed in chronological order(ascending). I tried adding the code from this answer to index.php but for some reason that didn’t seem to work. So instead I got the plugin “Advanced Post Types Order” and that seemed to work fine, in […]

how to insert data in li tag of navigation

I’m trying to insert an image for each of my navigation items without any plugins. I’m not much of a coder, but I googled for something called walker, but not sure if this should be done for my case. please suggest what should and how I should do this. <ul id=”blabla” etc> <li> I want […]

Set custom id to list element walker custom function

I am creating a navigation with bootstrap in a custom WP theme. I have managed to get this result: <li id=”menu-item-27″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-27″>…</li> However I have already styled my navigation before transforming it to WP navigation like this: <li class=”” id=”nava”><a href=”–><?php //echo get_option(‘home’);?><!–/”>Home</a></li> I want to replace id=”menu-item-27″ with id=”nava”. Any help […]