Pyrate.Ned
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Creating a dropdown in menu that lists authorsIsn’t that the same code I posted in my seventh post? Well besides the &exclude_admin=0 part any how. Also is it live on the site because I don’t see it right now.
Forum: Fixing WordPress
In reply to: Creating a dropdown in menu that lists authorsSorry will have to continue tomorrow or Monday, not sure my brain is working right at this point =) Way to late for me. I will have to look at it with a fresh head
Forum: Fixing WordPress
In reply to: Creating a dropdown in menu that lists authorsthe one with the sorry damn backticks, I move the add_filter to after you declare the function
Forum: Fixing WordPress
In reply to: Creating a dropdown in menu that lists authorshaha sorry grap the code the the filter at the bottom
Forum: Fixing WordPress
In reply to: Creating a dropdown in menu that lists authorsTry this
function wps_nav_authors($items, $args){ if( $args->theme_location == 'primary' ) { $items . '<li><a href="#">Authors</a><ul class="sub-menu"><li>' . wp_list_authors('show_fullname=1&optioncount=0&orderby=post_count&order=DESC&number=8&echo=0') . '</li></ul></li>'; return $items; } } add_filter('wp_nav_menu_items','wps_nav_authors', 10, 2);
sorry damn backticks
Forum: Fixing WordPress
In reply to: Creating a dropdown in menu that lists authorsright now is the code out or is it my code?
Forum: Fixing WordPress
In reply to: Creating a dropdown in menu that lists authorsits there on the top of the code
Forum: Fixing WordPress
In reply to: Creating a dropdown in menu that lists authorsyeah sorry missed a ; retry the code above
Forum: Fixing WordPress
In reply to: Creating a dropdown in menu that lists authorsOk one more
add_filter('wp_nav_menu_items','wps_nav_authors', 10, 2); function wps_nav_authors($items, $args){ if( $args->theme_location == 'primary' ) { $items . '<li><a href="#">Authors</a><ul class="sub-menu"><li>' . wp_list_authors('show_fullname=1&optioncount=0&orderby=post_count&order=DESC&number=8&echo=0') . '</li></ul></li>'; } return $items; }
Forum: Fixing WordPress
In reply to: Creating a dropdown in menu that lists authorsTry this
function wps_nav_authors($items, $args){ if( $args->theme_location == 'primary' ) { return $items . '<li><a href="#">Authors</a><ul class="sub-menu"><li>' . wp_list_authors('show_fullname=1&optioncount=0&orderby=post_count&order=DESC&number=8&echo=0') . '</li></ul></li>'; } } add_filter('wp_nav_menu_items','wps_nav_authors', 10, 2);
Forum: Fixing WordPress
In reply to: Creating a dropdown in menu that lists authorsok put it back
Forum: Fixing WordPress
In reply to: Creating a dropdown in menu that lists authorsremove the code really fast and let me see the secondary nav
Forum: Fixing WordPress
In reply to: Creating a dropdown in menu that lists authorspost a link to your site/page.
Forum: Fixing WordPress
In reply to: My Site Title will not change, Only my taglineLink to your site maybe helpful.
You do not really need content on https://example.com/top-level-page-name it can just be blank. You could even have a redirect on that page so other people can not access or see it.
add this to your header.php<?php if($post->ID==ID-NUMBER-OF-top-level-page-name){ header( 'Location: https://example.com/top-level-page-name/child-page/' ) ; }
And because php is server side no one will ever know or see the redirect