Home Forums WC Vendors Pro Support Add Title and content above Vendor dashboard Nav

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 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #58209
    Carin
    Participant

    I need to add a page title h1 tag and a paragraph above the navigation in Vendor Dashboard, there must be a filter I can add to functions.php with $message, I am just a php newbie, more of a web designer than developer, but I have worked a lot with functions.php, can you help?

    (I was just looking through examples and saw this as a way to add content

    add_filter('wcv_my_account_msg', 'custom_wcv_my_account_msg');
    function custom_wcv_my_account_msg(){
       $message = 'This is my new message on the my account page with the link to the <a href="/dashboard/">Pro Vendor Dashboard</a>.';
       return $message;
    }
    #58213
    Anna
    Member

    Hello,
    There is a built-in option to have a message displayed in this region- (wp admin > woocommerce > wc vendors > pro : Vendor Dashboard Notice)
    And if you wish to alter that further, there is a template for that message area:
    wp content/plugins/wcvendors-pro/templates/dashboard/dashboard-notice.php

    Here’s an article to help you with properly moving & saving modified templates:
    https://www.wcvendors.com/kb/changing-vendor-templates/

    #58223
    Carin
    Participant

    Hi Anna, thanks for that, I actually need the area above the Navigation, that’s why I thought maybe a filter?

    #58250
    Anna
    Member

    Hello,
    We do have the action hook for above the pro dashboard: wcv_pro_before_dashboard
    SO you could make a function for the message and use the add action with that hook.

    #58301
    Carin
    Participant

    Perfect, just what I needed, now all I need is to change the label “Dashboard” to “Seller’s Dashboard”, I know this is the code (below) , but I don’t know what the array key is for the Dashboard Label. Do You?

    (code in my functions.php already)

    function change_dashboard_labels( $dashboard_urls ){ 
    
    	// Products 
    
    	if ( array_key_exists('product', $dashboard_urls ) ) $dashboard_urls[ 'product' ][ 'label' ] = 'My Horses'; 
    #58327
    Anna
    Member

    Carin,
    This should do it (theme/child theme functions.php):

    add_filter('wcv_dashboard_home_url', 'rename_wcv_dashboard_home_url');
    function rename_wcv_dashboard_home_url ( $args ){
        $args['label'] = 'My Horses';
        return $args;
    }
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘WC Vendors Pro Support’ is closed to new topics and replies.