[wp-hackers] Retreive menu item permalink

Lox lox.dev at knc.nc
Mon Jun 21 00:35:39 UTC 2010

2010/6/21 Lox <lox.dev at knc.nc>:
> Oops forget about the debugging line: echo $item->ID . ' '. $itemId; echo "\n";
> --
> Lox
> lox.dev at knc.nc

Mmh well. It seems it was my bad.

Giving the fact that a menu_item is stored in featured-pages-menuItem
meta, this will give its url:

$item = wp_setup_nav_menu_item( get_post( get_post_meta($post->ID,
'featured-pages-menuItem',true) )));
echo $item->url;


lox.dev at knc.nc

More information about the wp-hackers mailing list