• Resolved hebhansen

    (@hebhansen)


    Hi Ollie

    I am adding shotcode block to a mega menu and then this:

    [product_categories columns="2"  parent="16" orderby="menu_order"]

    It renders across the site, but not in menu. Do you have any suggestions/ideas. It should display like so.

    Thx

    • This topic was modified 1 month, 2 weeks ago by hebhansen.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mike McAlister

    (@mmcalister)

    Hey there,

    Thanks for the message. Menu Designer leans heavily into blocks, so we can’t guarantee that shortcodes work here. I would try to use the block version of that shortcode of possible. If you are using Woo, you can use blocks to get product categories instead. The blocks will render fine.

    Thread Starter hebhansen

    (@hebhansen)

    hi @mmcalister

    could you more specifically lead me to a block that renders Product Categories with featured image and title.

    I have added the shortcode in the shortcode block if that’s what you mean

    Plugin Author Mike McAlister

    (@mmcalister)

    Hey there apologies for the delay. It looks like Woo doesn’t have a product category image block yet, but it’s in the works!

    Plugin Author Mike McAlister

    (@mmcalister)

    Hey there, just a heads up that in the next update we’ve added shortcode support. That update will be out shortly.

    Thread Starter hebhansen

    (@hebhansen)

    This did the trick for me in functions.php. Let me know if it conflicts with the solution you have applied. Note: this specifically triggers the shortcode amelia_menu_events. After next release I will test your solution.

    // Allow shortcode inside Ollie navigation
    add_filter('render_block', function($block_content, $block){
    if (!empty($block['blockName']) && $block['blockName'] === 'core/navigation') {
    if (has_shortcode($block_content, 'amelia_menu_events')) {
    $block_content = do_shortcode($block_content);
    }
    }
    return $block_content;
    }, 10, 2);
Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.