These classes are explained a bit more on the page for wp_list_pages
. But the words ‘parent’ and ‘ancestor’ give it away already.
A parent is an ancestor. A grandparent is also an ancestor, but not a parent.
If your hierarchy is only two deep, there will only be parents and children. So in that case all parents are ancestors and the two classes have the same effect. But when your hierarchy is deeper, the two classes get different meanings.
Related Posts:
- Determine which theme location a wp_get_nav_menu_items is for
- Remove unwanted elements for a wp_nav_menu
- How can you check if you are in a particular page in the WP Admin section? For example how can I check if I am in the Users > Your Profile page?
- Why does WordPress add 0 (zero) to an Ajax response?
- Passing arguments to a admin menu page callback?
- function deactivate_plugins does not exist
- Change the_title() of a page dynamically
- Understanding WordPress functions’ naming conventions
- Add Dividers or Separators Between Nav Menu Items
- Overwriting Core WordPress Functions with Plugins
- When is it appropriate to put functions on page template vs. functions.php?
- How can i list current author’s categories?
- Can I add pages to my custom menu via script?
- Replacing WordPress menu functionality with a plugin
- Dynamically Override Fancy Title
- Problems with removing admin bar
- Hook event for upload image in the menu
- Problem with `wp_mail()`
- Calling a function from functions.php in custom page/ blog post
- What is the Difference between directly call a function and call a function using add_action?
- How do I approach removing menu items on the fly based on settings in my plugin?
- Call to undefined function get_blog_option()
- Undefined function wp_set_password
- Delete a specific item menu when I deactivate my plugin
- Create a Page via plugin
- Add Submenu Link in add_submenu_page That Opens in a New Window
- Plugin Uninstall and Deactivate via Options Menu
- How to assign a WP 3.0 custom nav menu to a theme’s navigation menu location via script?
- How to add pages to custom menus on the fly [duplicate]
- How can I add a CSS rule to edit.php?
- How do I add a custom sublevel menu specified in one directory to a custom top level menu specified in another directory?
- add more custom post types and custom role to the code
- How to use WP_Term with (menu) argument in the wp_nav_menu?
- Enqueue scripts in footer
- is user logged in not working
- Override class inside $atts shortcode_atts in WordPress
- add_rewrite_rule works in themes function php but when moved into plugin it stops working
- custom post type not showing in menu
- Adding custom fields to WordPress nav menus
- Where can i find wordpress auto update code flows?
- Sub Menu content is being duplicated
- correct way to call javascript into hook function
- how to search users by ajax live search
- Is this best practice for Dynamically adding items to WordPress menus?
- How to remove or add submenu item on plugin activate or deactive
- How to add user details to different tables immediately after user registration
- mysql_real_escape_string() vs. esc_sql() in WordPress
- Checking for existence of a page by title?
- how to get context information inside my funcion
- Redirect to another page using contact form 7? [closed]
- How to modify files inside wp-includes directory in wordpress
- Fatal error: Call to a member function get_page_permastruct() on a non-object
- wp_get_post_terms Order by not working
- Function/Class to list categories with checkboxes
- Why wp_die() doesn’t work with wp_redirect but exit() works
- Warning: call_user_func_array() expects parameter 1 to be a valid callback
- Autogenerate a Table of Contents
- Alternative functions for mysql_free_result and mysql_ping in wordpress functions
- WordPress multisite,use same cookies across all website?
- Call to undefined function is_home() or any conditional tags
- unregister_setting() vs delete_option() for plugin update
- How to change WooCommerce loop product title HTML output in single product page and archive page
- Issue with plugin sub menu and pages
- wp_schedule_event is registered but function isn’t running
- How to add Plugin functionality in WordPress Frontend Menus
- Overwriting a plugin function
- Writing editor content to a file
- How to hide page links from theme menu
- WP_NAV_MENU filter targets all menus
- How do I add a menu item to a Pods admin menu?
- Adding tables to dashboard pages programmatically?
- WP 3-way voting system: On to something! Please help!
- Custom Settings Plugin Save foreach checkboxes
- Customise Grouped Product display in Woocommerce with custom column
- Can someone explain what’s the use of parse request function in WordPress?
- function add custom fields to media gallery
- Make visible page only in the trash
- WordPress: I wanted to use Add rewrite rule multiple times for multiple CPT in my plugin
- Why would one specify multiple arguments when using get_previous_posts_link() which takes only one parameter?
- WordPress Ajax not returning Response
- Does hooking into a plugin action / filter override the plugin’s function for that hook?
- Remove tag from all posts when publishing new post
- WordPress plugin how to run function when button is clicked
- remove different admin menu for specific users
- foreach argument to get specific file types getting too many returns
- How to get an array out of a nav menu if it’s a plugin?
- Remove from a div by class name from post page if post author role is not administrator
- Ajax not working to insert, query and result data
- WordPress permalink setting
- How can I add recent posts to menu like mashable
- Why is ‘register_activation_hook’ undefined?
- What happens when you create/edit a menu
- Dynamic banner for use on external sites
- Adding parent custom post type menu option
- How can i call from custom fields to the category editor?
- Create and style menu
- Change the class of wordpress menu
- Why does this fail: Disabling plugins enqueue_script() in functions.php
- How to plugin function code move to theme function.php ? I’ve tried below code but not working [closed]
- WordPress simple ‘Hello World’ plugin – problems