[wp-hackers] Select pages's associated menu items in a specific menu

Mike Schinkel mikeschinkel at newclarity.net
Wed Jul 28 02:02:51 UTC 2010

On Jul 27, 2010, at 8:14 PM, Lox wrote:
> 2010/7/28 Mike Schinkel <mikeschinkel at newclarity.net>:
>> So do you mean you have menus where a post may be referenced several times
> Sure, but the problem is with posts that may be referenced several

I just wanted to understand what your requirements were.  (BTW, do you frequently have menu options that point to the same post? Hmm..)

I was struggling with what you wanted and also with the solution for what I think you are looking for so I decided to do it in "my native language" first, which would be SQL. :) 

Can you verify that this gives you the results you are looking for?


Copy the raw file to test.php in the root of your site and call it like this (replacing the URL params with your values of course):


Let me know if this is ultimately what you want (I know it's better to use the WordPress API, but we'll get there...)



More information about the wp-hackers mailing list