remove auto generated pages from the menu?

If you don’t want them to ever be listed (using wp_list_pages at least) then you could hide them using a filter add_filter(‘wp_list_pages_excludes’, ‘my_page_excludes’); function my_page_excludes() { // the array should contain the page ids you want to exclude return array(1,6,7,12); } This will stop them from displaying in anything that lists pages using WordPress template … Read more

alternating classes on wp_list_pages

Consider this a complement to toscho’s solution. I believe that … $this->alternate = ($this->alternate != ‘background_1’) ? ‘background_1’ : ‘background_2′; $css_class[] = $this->alternate; … will do what you want. The difference is that toscho’s solution, using the static keyword, will make that variable static for any instantiation of this walker– that is, all instances will … Read more

Add ID to target navigation link

I wasn’t able to find something that would add an id, but I did find something that would give me a class…this way I can target the class using jQuery. The default id’s and classes are ok, but the solution I found is much better because no matter which website you apply it to it … Read more

List all pages including archive

Yep, this is definitely possible. Grab your post types and insert them in $post_types to loop through every one of them to manually generate the archives and posts: <?php // post types of your choice $post_types = array( ‘page’, ‘work’, ‘people’ ); $wp_cats = array(); foreach ( $post_types as $post_type ) { $pages = get_pages( … Read more

wp_list_pages Hierarchical Help

After you global $post, you can use the core WordPress function get_post_ancestors() to retrieve the parent pages. Example $ancestors = get_post_ancestors($post); if($ancestors){ foreach(array_reverse($ancestors) as $post_id){ $ancestor_page = get_post($post_id); } } Then, to retrieve all child pages of the current page, you could make it easy by using a custom function. Place your custom function in … Read more

Adding elements to wp_list_pages (within , but before )

If I Understood your question right, instead of wp_list_pages, you can use a custom query using get_pages e.g. $args = array( ‘sort_order’ => ‘ASC’, ‘sort_column’ => ‘menu_order’, ‘hierarchical’ => 1, ‘exclude’ => ”, ‘child_of’ => 0, ‘parent’ => -1, ‘exclude_tree’ => ”, ‘number’ => ”, ‘offset’ => 0, ‘post_type’ => ‘page’, ‘post_status’ => ‘publish’ ); … Read more

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