setting up custom dashboard and change Pro site link

Hi,
I have setup Wordpress multisite by following your tutorials. I am using Gravity form with user registration addon, New Blog Templates plugin, Pro site plugin.
1 - when I create a user and login to users dashboard, there is a message on the top "You have 30 days left in your 123Pro free trial. Checkout now to prevent losing 123Pro features » " which links to pros site page. How can I customize this link?

2 - Do you have any plugins that will allow me to customize the users dashboard by entering my own message instead of "welcome to wordpress"

thanks
Sam

  • Rupok

    Hi Sam

    Hope you had a wonderful day.

    How can I customize this link?

    I could give you required jQuery code to change the link if I could see it live on your site. Can you tell us the process for seeing this notice in action in your site? Am I required to create a new site or register an account from front end of your site?

    Do you have any plugins that will allow me to customize the users dashboard by entering my own message instead of "welcome to wordpress"

    You can do this by creating a MU Plugin. For creating a mu plugin, create a folder named "mu-plugins" inside your "wp-content" folder. Then inside that "mu-plugins" folder, create a file with any name and with a .php extension. Now paste the code inside that file and save.

    <?php
    function st_welcome_panel() {
    echo
    '<div class="welcome-panel-content">'
    .'<h3>Your Welcome Title</h3>'
    .'<p>Quisque imperdiet, lorem non pellentesque cursus, justo ipsum suscipit ante, id tristique odio orci quis neque. Duis a placerat dolor? Maecenas auctor, odio sed tincidunt consequat; arcu elit mollis quam, sed tristique turpis erat non tortor. Sed rhoncus dolor vitae mollis viverra. Vivamus ut justo lobortis, vulputate quam sed, aliquam ipsum. Ut vestibulum sem nec luctus facilisis. Cras felis nunc, mollis eu finibus id, varius eu eros? Vestibulum vitae sapien sit amet nunc malesuada vestibulum.Ut fermentum purus eget nunc efficitur, in molestie est tincidunt.</p>'
    .'</div>';
    }
    
    remove_action('welcome_panel','wp_welcome_panel');
    add_action('welcome_panel','st_welcome_panel'); 
    
    function st_welcome_init() {
    global $wpdb;
    $wpdb->update($wpdb->usermeta,array('meta_value'=>1),array('meta_key'=>'show_welcome_panel'));
    }
    
    add_action('after_switch_theme','st_welcome_init');
    ?>

    For getting more idea on mu plugins, you can go through this article: https://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    Replace "Your Welcome Title" and dummy text with your required content. Please let us know if you have any confusion. We will be glad to help.

    Have a nice day. Cheers!
    Rupok

  • Nithin

    Hi Sam,

    Hope you are doing good today. :slight_smile:

    I created "mu-plugins" folder inside wp-content folder and create dashboard.php copied/paste the codes you've provided and now it gives an error when you login to dashboard.

    Could you please check whether there are spaces or new lines before an opening "<?php" tag and after a closing "?>" tag, inside your file in mu-plugins/ folder.

    you can create an account at http://123ehost.website/signup/ ( after I changed the theme to upfront the submit button for gravity form shows on the top)

    #gform_submit_button_1 input[type="submit"] {
    
    	position: relative;
    }

    Please try the following CSS code for the submit button to show at the bottom. Please do note to make these changes using a child theme, or you could use a plugin like Simple CSS to add custom css.

    Regarding customizing the link, since it's a dynamic link, I'm afraid you'll have to edit the plugin file located in pro-sites/pro-sites.php on line 701.

    <a href="http://your-site.com/link">' . $notice . '</a>

    Please do note this will get overwritten once you update the plugin.

    I hope this helps. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Sam

    "Could you please check whether there are spaces or new lines before an opening "<?php" tag and after a closing "?>" tag, inside your file in mu-plugins/ folder."
    Yes there is. I have removed dashboard.php from folder mu-plugins for now since it would not allow me to login to wordpress dashboard.

    I've added the gravity form script you've provided inside Simple CSS and did not function.

    "' . $notice . '"
    Works like a charm.

    thanks
    Sam

  • Nithin

    Hi Sam,

    Yes there is. I have removed dashboard.php from folder mu-plugins for now since it would not allow me to login to wordpress dashboard.

    I did try running this script in my system and seems to work. Removing the extra space and new lines from your file, did that clear the error? You could also test the above functions by adding those in your themes functions.php file and see whether that works.

    I've added the gravity form script you've provided inside Simple CSS and did not function.

    div#page .upfront-output-region-container .content-only.upost-data-object-post_data .content input[type="submit"] {
    	position: relative;
    }

    I hope this helps. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.