wp_nav_menu() reutrns HTTPS?
wp_nav_menu() reutrns HTTPS?
wp_nav_menu() reutrns HTTPS?
You could either extend the Walker_Nav_Menu walker class (i.e., the start_el function is sufficient, as already mentioned). Or you could hook in when the original output (i.e., the category) has been created. That would be the walker_nav_menu_start_el hook. For instance like so: function wpdev_139801_start_el( $item_output, $item ) { if ( isset( $item->object ) && $item->object … Read more
wp_dropdown_nav function to list menu items
As pointed out from @Howdy_McGee it should be possible to use the current-menu-anchestor css class. However, using the standard menu walker in a CPT archive page taxonomically nested under a menu item I wasn’t able to get the class out as expected. The solution I adopted was to add a create a filter to inject … Read more
After some additional research it looks like it will require to use two separate methods to get next/previous page/post to work. More here,here and here Solution for pages: <?php $pagelist = get_pages(‘sort_column=menu_order&sort_order=asc’); $pages = array(); foreach ($pagelist as $page) { $pages[] += $page->ID; } $current = array_search(get_the_ID(), $pages); $prevID = $pages[$current-1]; $nextID = $pages[$current+1]; ?> … Read more
Transfering static site to wordpress and retaining category by month paginations
A filter solution could be the nav_menu_css_class filter. A CSS solution could be to use the body_class to make more specific css rules.
Your code: ul#menu-menu-1 > li,a:first { margin-left: 0px; } You need to apply the first-child to the list element, and not to the link. You should also not have a comma. Comma indicates a new selection. Try this: ul#menu-menu-1 > li:first-child a{ maegin-left:0px; } *first-child does not work in ie8 and earlier.
WordPress allows the addition of extra nav menus. Add this to your child themes functions file: register_nav_menus( array( ‘secondary_menu’ => ‘My Second Menu’ ) ); Add this to your header.php file or the file where you want to display your extra nav menu. <nav id=”site-navigation” class=”main-navigation” role=”navigation”> <?php wp_nav_menu( array( ‘theme_location’ => ‘secondary’, ‘menu_class’ => … Read more
This question has the same solution as that one. The answer is short, so I post it here as well: In WordPress 3.9 (and still in 3.9.1) there’s a bug concerning the excluded terms in get_adjacent_post(). There’s a plugin to fix that bug.