• I work on the development and this is one of the plugins we use.

    It appears the way a max menu works is it creates its own menus and saves it as menu items on a max mega menu on wp, and then somehow cross references it back since I’ve verified that when pulling elements from our main menu, it no longer shows the items that are mega menus.

    But the problem arises on how the menu is saved. When running the command wp_get_nav_menu_items($MENU_ID), it pulls the items but the products which started out having an object type of product_cat are now nav_menu_item and it’s messing up our developement. We can get by for now, but it will affect future development. You could also do something that would reference the existing type so we can get by.

    Can you please have you please have your developers fix that glitch.

    Here is an example object that we pulled using that function.

    [0] =>
    WP_Post Object
    (
    [ID] => 22783
    [post_author] => 20
    [post_date] => 2021-08-28 07:08:58
    [post_date_gmt] => 2021-06-09 11:22:29
    [post_content] =>
    [post_title] => Furniture
    [post_excerpt] =>
    [post_status] => publish
    [comment_status] => closed
    [ping_status] => closed
    [post_password] =>
    [post_name] => furniture
    [to_ping] =>
    [pinged] =>
    [post_modified] => 2021-08-28 07:08:58
    [post_modified_gmt] => 2021-08-28 07:08:58
    [post_content_filtered] =>
    [post_parent] => 0
    [guid] => https://biltzone.biltpros.com/?p=22783
    [menu_order] => 1
    [post_type] => nav_menu_item
    [post_mime_type] =>
    [comment_count] => 0
    [filter] => raw
    [db_id] => 22783
    [menu_item_parent] => 0
    [object_id] => 22783
    [object] => custom
    [type] => custom
    [type_label] => Custom Link
    [title] => Furniture
    [url] =>
    [target] =>
    [attr_title] =>
    [description] =>
    [classes] => Array
    (
    [0] =>
    )

    [xfn] =>
    )
    • This topic was modified 4 months, 1 week ago by baddon250.
Viewing 1 replies (of 1 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi baddon250,

    Max Mega Menu leaves the menu creation and saving process entirely down to core WordPress (all we do is store some extra information in the metadata for each menu item).

    The debug you’ve posted looks correct. The menu structure is saved by WordPress as a list of items that references other data in your database. It doesn’t store the item itself; your product_cat is saved as a nav_menu_item that references the product_cat. I think if you did get_post_type() on the db_id from your debug above, it’d come back and give you the product category. I hope that helps point you in the right direction.

    Regards,
    Tom

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.