Exclude pages by custom field (with yes/no) storing wrong data?
Exclude pages by custom field (with yes/no) storing wrong data?
Exclude pages by custom field (with yes/no) storing wrong data?
I ended up running the function twice on itself. That way, once the walker updated the last element, it went back up to the top to update the first.
Use the WordPress Menu system, which allows you to set custom classes (Make sure you open up “Screen Options” and check the “CSS Classes” check box to see the settings)
By default the function cannot do this, but you can specify a custom walker when you call the function, and then implement your own walker: http://bugssite.org/blog/2009/12/08/wordpress-custom-walker-tutorial/ http://www.wprecipes.com/how-to-modify-lists-like-categories-and-blogroll-in-wordpress This way you can keep the code the same, but add a check on the date of the page being walked over, and ‘skip’ it if it doesn’t … Read more
wp_list_categories() Would be the way to go for taxonomies. Further functionality can be done either with a custom walker on this function (This seems to be the one resource: http://scribu.net/wordpress/extending-the-category-walker.html) or write a custom SQL script. In the end, I went with wp_list_pages and sorted by custom post type where: post_type => ‘custom-post-type’ is listed … Read more
According to this thread, you can add a custom Walker class to your wp_list_pages() call. It looks like that’s the way to go, since wp_list_pages() prints or returns a string. If you set $args[‘echo’] to false, you can do some string manipulation before you echo() it, but it seems to me that the Walker solution … Read more
Do you want to list only the pages with children? I’m not sure to understand well what you want to do 🙁 If I’m right, you’ll have to do something like this with get_pages() and generate your listing manually after: // First get all pages $pages = get_pages(); // Then, get page IDs if ($pages) … Read more
I don’t know what you mean by “open a second navigation”. That could mean several things. But to get an “empty” link you have a couple of choices: Option #1– aka, easy but kind-of a hack Add a menu item with the “Custom Links” form. You have to provide an URL but you can delete … Read more
Change class name in WordPress wp_list_page nav
You’ll have to use this function get_queried_object_id(), if the ID returned by this function is equal to the ID of the page ($page->ID in your code), that’s the current page. Based on that you can add a class.