Ecommerce Shopify WordPress Discussion

Create a custom wordpress menu shows a list of posts as sub menu based on its parent menu items (categories) and display using a shortcode

I have a custom post-types called products that contain a list of products. I have created a menu called hierarchical menu in wordpress dashboard > appearance > menus as illustrated below: Electronics -> Camera -> Headphones -> Tv accessories Computers -> Monitors -> Keyboards -> Mouse Stationaries -> Pen -> Pencil -> Notebooks -> Paper I need to create and display a custom menu using shortcode for eg., If I click on camera it displays a list of posts from Product post type with categories of electronics, camera as a submenu Electronics -> Camera --> list of posts with categoreis Electronics / Camera (dynamic) Here is an example of the feature Where the fourth column is essentially a list of products with categories highlighted. See the feature in action https://www.trelleborg-tires.com/en I am not sure how to go about creating this. I use below code to generate the menu and display using shortcode. But I have zero clue on how to dynamically show the list of posts based on its parent criteria. Any help / Guidance greatly appreciated would be greatly appreciated. function custom_hierarchical_menu() { // Get the generated menu HTML without echoing it $menu_html = wp_nav_menu( array( 'menu' => 'Hierarchy Desktop Menu', 'echo' => false, // Set 'echo' to false to store the HTML in $menu_html ) ); return $menu_html; } add_shortcode( 'customHierarchicalMenu', 'custom_hierarchical_menu');
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.