With WooCommerce Product Vendors you can allow other people to sell their products in your store.

You will probably want to create a custom page for each of them, and this is automatically done by the extension because vendors are taxonomies.

They have a description, a title, and some other options. But the description does not allow to add shortcodes.

Shortcodes are something that helps a lot in the website development and make things a lot quicker.

How to allow to add shortcodes in the product vendor description?

Open your functions.php file located in wp-content/themes/your-theme-name/ and add this code at the end of the file:

This code is really easy to understand, it passes the variable $desc (the description text) to the WordPress function do_shortcode which executes all the shortcodes contained in it, then returns the executed contents to the plugin which prints it on the page.

5 replies
  1. Reeve
    Reeve says:

    Hello

    I just want to thank you for the codes. They worked like a charm.
    Shortcodes in the description worked , however they are filtering out all the headings.

    For example:
    [ux_banner bg=”#000″ height=”350px”]

    Sale

    [/ux_banner]

    They would turn out without the

    So the words “Sale” can’t be resized.
    Is there anyway to allow add_filter headings?

    Your help is greatly appreciated.
    Thank you in advance

    Yours sincerely
    Reeve

    Reply
  2. Kevin
    Kevin says:

    Hi,
    Should a similar code work for woocommerce market place wcmp. I recently downloaded the woo commerce product table plugin but wish to use it on my vendor pages however wcmp does not create editable pages for its vendors.

    Reply
  3. Kevin
    Kevin says:

    Apologies, more details. The reason I ask about entering the shortcode is that the woocommerce product table plugin seems to only allow me to add the shortcode to pages and does not allow the feature to be gobally activated.

    Thanks,

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

You have to agree to the comment policy.

This site uses Akismet to reduce spam. Learn how your comment data is processed.