upfront name alteração , personalizardo

you as I do I change the name of upfront wordpress tools menu, I would put there website editing instead of "upfront"

  • Ash

    Hello @ladoalado

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    The appropriate way is to translate the theme. Here is a tutorial link: https://premium.wpmudev.org/blog/how-to-translate-a-wordpress-theme/

    You can also translate in here and download the po and mo file: https://premium.wpmudev.org/translate/projects/upfront

    I have another easy way though. You can use the following code:

    add_action( 'wp_head', 'change_upfront_text' );
    add_action( 'admin_head', 'change_upfront_text' );
    function change_upfront_text() {
    	?>
    	<script type="text/javascript">
    	jQuery(function($) {
    		$('#wp-admin-bar-upfront-edit_layout a').text('Alteração');
    	});
    	</script>
    	<?php
    }

    You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'. If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that, give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

  • Ash

    Hello @ladoalado

    As I mentioned, you may need to start with a php start tag. So, use this code:

    add_action( 'wp_head', 'change_upfront_text' );
    add_action( 'admin_head', 'change_upfront_text' );
    function change_upfront_text() {
    	?>
    	<script type="text/javascript">
    	jQuery(function($) {
    		$('#wp-admin-bar-upfront-edit_layout a').text('Alteração');
    	});
    	</script>
    	<?php
    }

    This code will change the upfront text you pointed at the first screenshot.

    To change the logo try the following css:

    .upfront-logo{
    background: url(path/to/your/logo) 0 0 no-repeat;
    }

    Change the path to logo with appropriate path.

    You can add this to a theme's stylesheet, in a child theme, or using a plugin like My Custom CSS.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

  • Ash

    Hi there

    I hope you are well today.

    1. Create a file called custom-mu.php
    2. About the logo, upload your logo in root (where wp-login.php file is), e.g. your logo is logo.png.
    3. Add the following code in there:

    <?php
    add_action( 'wp_head', 'change_upfront_text' );
    add_action( 'admin_head', 'change_upfront_text' );
    function change_upfront_text() {
    	?>
    	<script type="text/javascript">
    	jQuery(function($) {
    		$('#wp-admin-bar-upfront-edit_layout a').text('Alteração');
    	});
    	</script>
            <style>
            .upfront-logo{
    background: url(http://domain.com/logo.png) 0 0 no-repeat !important;
    }
            </style>
    	<?php
    }

    4. Upload the file in /wp-content/mu-plugins/ folder. If there is no "mu-plugins" folder in there, just create one :slight_smile:
    5. Don't forget to replace domain.com with actual domain.

    Please let me know if it works now.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.