Professionalism is needed on a clients site and I feel that this would be a well deserved feature to add to ASE.
// Greet user with Good Morning, Afternoon or Evening depending on the time of day
function ctm_replace_howdy( $wp_admin_bar ) {
// Get the current hour
$current_hour = date( 'H' );
// Define the greetings based on the time of day
if ( $current_hour < 12 ) {
$greeting = 'Good Morning';
} elseif ( $current_hour < 18 ) {
$greeting = 'Good Afternoon';
} else {
$greeting = 'Good Evening';
}
// Get the node
$my_account = $wp_admin_bar->get_node( 'my-account' );
// Extract the username from the title
preg_match( '/^(.*),(.*)$/', $my_account->title, $matches );
$username = trim( $matches[2] );
// Construct the new title with the updated greeting
$new_title = $greeting . ', ' . $username;
// Update the title
$my_account->title = $new_title;
// Add the updated node
$wp_admin_bar->add_node( array(
'id' => 'my-account',
'title' => $my_account->title,
) );
}
add_filter( 'admin_bar_menu', 'ctm_replace_howdy', 25 );
]]>If anybody has any suggestions, I would be most grateful.
]]>Developer please help!
]]>mobile view, both Android/iPhone
First problem (screenshot) – the greeting message iframe expands and overlaps the content behind it. I’ve seen more of this issue in this forum, but no solution.
Second problem (screenshot) – the chat window sticks to the top of the webpage covering the minimize and close controls, so the user ends up with only two options – opening the chat or refreshing the website, neither of which is great if the user never wanted to open the chat.
I used the plugin, but I couldn’t solve any issue, so I followed these steps and eventually added the chat bubble code directly to my website.
It solved exactly one issue – of automatic opening of the greeting message when the user visits the page – now it won’t open automatically and that’s awesome because the user doesn’t have to deal with the shit right away. But eventually, if they click on the chat bubble, they will have to deal with it.
So, can you tell what might be the cause of this issue? Can we find a solution to it? Thank you.
]]>The profile pages shows “Howdy_User” as the greeting, which is quite informal. I would like to change it to “Welcome”. I know howdy is used in WP as global greeting, but could you point me where to edit (core files) in tutor plugin to change it.
Thanks
]]>Any pointers to change “Howdy” from the user profile (frontend) which is so informal to something like “Welcome”. I think the change has to be done in the functions.php file of the theme and I have tried that, but it gets it done only in the backend and not with the frontend non admin user profiles.
I googled around and in through this forum but nothing really helpful and recent came up.
I tried adding this in functions.php in the theme, but worked only with the admin backend –
add_action( ‘admin_bar_menu’, ‘wp_admin_bar_my_custom_account_menu’, 11 );
function wp_admin_bar_my_custom_account_menu( $wp_admin_bar ) {
$user_id = get_current_user_id();
$current_user = wp_get_current_user();
$profile_url = get_edit_profile_url( $user_id );
if ( 0 != $user_id ) {
/* Add the “My Account” menu */
$avatar = get_avatar( $user_id, 28 );
$howdy = sprintf( __(‘Welcome, %1$s’), $current_user->display_name );
$class = empty( $avatar ) ? ” : ‘with-avatar’;
$wp_admin_bar->add_menu( array(
‘id’ => ‘my-account’,
‘parent’ => ‘top-secondary’,
‘title’ => $howdy . $avatar,
‘href’ => $profile_url,
‘meta’ => array(
‘class’ => $class,
),
) );
}
}
I have the site https://www.gothamartshd.com setup and successfully running a multisite for https://store.gothamartshd.com
Now, going to https://test.gothamartshd.com my site redirects to my other site (mdpdance.com) and gives me the following:
“Greetings Network Administrator! The network currently allows user registrations. To change or disable registration go to your Options page.”
The site you were looking for, https://testgothamartshdcom.mdpdance.com/, does not exist.”
Note: The FTP server has mdpdance.com WP installed and gothamartshd.com WP in a folder on the FTP.
I have changed my .htaccess many times. Maybe missing something here.
The following doesn’t work:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I changed it to this, still not working:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
</IfModule>
# END WordPress
And adding the following to my wp-config.php:
define('WP_HOME','https://gothamartshd.com');
define('WP_SITEURL','https://gothamartshd.com');
/* Enabling multisites */
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'gothamartshd.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
/* Fix for ram crashing issues with menu and resolved Theme Customization. */
define('WP_MEMORY_LIMIT','128M');
define('WP_MAX_MEMORY_LIMIT','512M');
define('NOBLOGREDIRECT', 'https://gothamartshd.com/');
/* That's all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
Any suggestions?
Thanks in advance.
When viewing the site on tablet/mobile the greeting message pops up and when I’ve selected to close, it keeps popping open afterwards. Is there a setting to stop this and also is there is some code I can use to get rid of the greeting message all together that would be great, especially for tablet and mobile-only!!
Thank you in advance.
]]>