Marketplace related products control

Can you stop related products appearing if you do not add any to a product. I want them to appear on only some products but they are automatically added by the system

  • Predrag Dubajic

    Hey Barry,

    Hope you're doing well today :slight_smile:

    I'm afraid that MarketPress currently doesn't have an option to disable related products when nothing is entered.
    Changing this functionality would require code changes in plugin itself and that should be avoided whenever possible so it would be better to go with CSS solution here.

    What you can do is use CSS code like this one:

    #mp-single-product-XX .mp-related-products,
    #mp-single-product-YY .mp-related-products {
        display: none;

    Where XX and YY are product IDs, so with that code posts with that ID will hide the related products tab, and if you need to hide it on more than 2 products simply duplicate the first line of code and enter new product ID.

    WordPress offers Custom CSS field inside Appearance > Customizer but if your theme disables this and it doesn't have its own CSS field you may wish to use a child theme or a plugin like this one for this additional CSS. That way you're protected when you come to upgrade.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.