Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SELECT
c.post_title,
c.post_content
FROM
wp_posts a,
wp_postmeta b
LEFT JOIN
wp_posts c
ON
c.ID = b.meta_value
WHERE
a.post_type = 'nav_menu_item' AND
b.meta_key = '_menu_item_object_id' AND
a.ID = b.post_id
ORDER BY
a.menu_order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment