[wp-hackers] Retreive menu item permalink
Mike Schinkel
mikeschinkel at newclarity.net
Mon Jun 21 00:18:55 UTC 2010
Hi Lox,
Sounds like you've worked on something very similar to something I worked on recently. Based on your description though I'm not sure how you are relating your custom post type to your menu item? In my case I created a custom field in postmeta for the custom post type and stored the menu ID in it for the post of post type "nav_menu_item." Is that how you did it, or something else? Maybe a little more specific details of what you are trying to accomplish would help us help you?
-Mike
On Jun 20, 2010, at 8:11 PM, Lox wrote:
> Hello,
>
> I am working on a plugin that uses custom posts to manage a list a
> feature "menu item". For each created item I can set an image, a text
> and the menu item that it points to. When saved I record the menu item
> ID.
>
> I can display my featured custom post on the home page but I am having
> trouble retriving a menu item permlink using its ID (I mean the
> permalink the menu item points too)
>
> - get_permalink($post->ID) fails
> - I have tried wp_setup_nav_menu_item( get_post($post->ID)) witch fails too
>
> Any thought?
>
> Regards
>
> --
> Lox
> lox.dev at knc.nc
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list