Home Forums WC Vendors Pro Support Custom Vendor Pro Dashboard Link

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #64888
    Mehmet
    Participant

    Hi,
    i want to show the Vendor Pro Dashboard link only to the vendors, not the normal Users. Is there any code to do it? I don’t want to use a menu-plugin.

    #64908
    Ilja Becker
    Participant

    Hey Mehmet,
    i had the same Problem.
    I wanted to hide content based on User Roles
    I created a new css Class witch is based on Role “Vendor”.

    add_action( 'wp_enqueue_scripts', 'cyb_enqueue_styles' );
    function cyb_enqueue_styles() {
    
        $user = wp_get_current_user();
        if ( in_array( 'vendor', (array) $user->roles ) ) {
            wp_enqueue_style( 'my-style-vendor', get_stylesheet_directory_uri().'/CSS/vendor.css' );
        }
    
    }

    Now create “vendor.css” in folder “your-child”/CSS in put your code in to hide or show the content

    #65078
    Mehmet
    Participant

    Hey ILBE,
    thx for your help, it works :).

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘WC Vendors Pro Support’ is closed to new topics and replies.
This website uses cookies to ensure you get the best experience on our website.