Title: userkind's Replies | WordPress.org

---

# userkind

  [  ](https://wordpress.org/support/users/userkind/)

 *   [Profile](https://wordpress.org/support/users/userkind/)
 *   [Topics Started](https://wordpress.org/support/users/userkind/topics/)
 *   [Replies Created](https://wordpress.org/support/users/userkind/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/userkind/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/userkind/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/userkind/engagements/)
 *   [Favorites](https://wordpress.org/support/users/userkind/favorites/)

 Search replies:

## Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [output the post id of wp_nav_menu items](https://wordpress.org/support/topic/output-the-post-id-of-wp_nav_menu-items/)
 *  Thread Starter [userkind](https://wordpress.org/support/users/userkind/)
 * (@userkind)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/output-the-post-id-of-wp_nav_menu-items/#post-1600071)
 * Here’s the Walker_Nav_Menu code that I have working:
 * It gets the main menu and outputs each menu item’s post-id in a comma delimited
   list.
 *     ```
       // get menu item's content id
             class pages_from_nav extends Walker_Nav_Menu
             {
                   function start_el(&$output, $item, $depth, $args)
                   {
                        global $wp_query;
       		    	 $item_output .= $item->object_id;
       		    	 $item_output .= ',';
   
                         $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
                         }
             }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [output the post id of wp_nav_menu items](https://wordpress.org/support/topic/output-the-post-id-of-wp_nav_menu-items/)
 *  Thread Starter [userkind](https://wordpress.org/support/users/userkind/)
 * (@userkind)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/output-the-post-id-of-wp_nav_menu-items/#post-1600065)
 * That totally did it! Thanks a million.
 * BTW, do you know of a reference of where I could see a list of variables like
   object_id to know that it exists?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [output the post id of wp_nav_menu items](https://wordpress.org/support/topic/output-the-post-id-of-wp_nav_menu-items/)
 *  Thread Starter [userkind](https://wordpress.org/support/users/userkind/)
 * (@userkind)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/output-the-post-id-of-wp_nav_menu-items/#post-1600042)
 * After some more research getting me nowhere on the issue, I’m wondering If the
   only way to accomplish this is via a custom sql query.
 * I’ve been avoiding that because there must be a better way, after all $item->
   url figures out how to build the link based on the destination content, but perhaps
   there’s not.
 * Is there a way to hook into the $url variable and get the content id that way?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [output the post id of wp_nav_menu items](https://wordpress.org/support/topic/output-the-post-id-of-wp_nav_menu-items/)
 *  Thread Starter [userkind](https://wordpress.org/support/users/userkind/)
 * (@userkind)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/output-the-post-id-of-wp_nav_menu-items/#post-1599933)
 * bump, any takers?

Viewing 4 replies - 1 through 4 (of 4 total)