Profile cover photo
Profile photo
Dinesh Kumar Krishna
79 followers
79 followers
About
Posts

Post has attachment
Our Rivers Are Dying
Ganga, Krishna, Narmada, Kaveri – many of our great rivers are depleting fast. If we do not act now, the legacy we hand over to the next generation will be one of conflict and deprivation. These rivers nurtured and nourished us for thousands of years. It is...
Add a comment...

Post has attachment
Add a comment...

Post has attachment

Post has attachment

Post has attachment
Add a comment...

Post has attachment
Add a comment...

Hi,

I need to access all wordpress menus and categories with their links using sql query. I am able to get menu name, ter_id,order but how to get their links and categories. I am posting query . Please hep me out.

"SELECT p.ID, p.post_title, p.post_name, p.menu_order, n.post_name as n_name, n.post_title as n_title, m.meta_value, pp.meta_value as menu_parent,pt.meta_value as type
FROM wp_term_relationships as txr 
INNER JOIN wp_posts as p ON txr.object_id = p.ID 
LEFT JOIN wp_postmeta as m ON p.ID = m.post_id 
LEFT JOIN wp_postmeta as pl ON p.ID = pl.post_id AND pl.meta_key = '_menu_item_object_id' 
LEFT JOIN wp_postmeta as pp ON p.ID = pp.post_id AND pp.meta_key = '_menu_item_menu_item_parent'
LEFT JOIN wp_postmeta as pt ON p.ID = pt.post_id AND pt.meta_key = '_menu_item_object'
LEFT JOIN wp_posts as n ON pl.meta_value = n.ID 
WHERE p.post_status='publish' 
    AND p.post_type = 'nav_menu_item' AND m.meta_key = '_menu_item_url' 
ORDER BY p.menu_order"

Post has attachment
Download PDF
The Monk Who Sold His Ferrari
The Monk Who Sold His Ferrari
tinypctricks.blogspot.com
Add a comment...

Post has attachment
Add a comment...

Post has attachment
Pope Francis stresses 'right to environment' in UN speech
Pope Francis has urged a large gathering of world leaders at the United Nations in New York to respect humanity's "right to the environment". He also called on financial agencies not to subject countries to "oppressive lending systems" that worsen poverty. ...
Add a comment...
Wait while more posts are being loaded