MrBrian
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Job Manager] Error: "Post_content cannot be null"How is line 438 the “culprit”? It just saves the job data.
WP Job Manager does not generate a “post_content cannot be null” error nor does it require the job description to have text – check Listify theme support or another plugin on your site. Use a plugin like “String Locator” to search all your files for that error string.
Forum: Plugins
In reply to: [WP Job Manager] code will not work on the job page ?????????Your issue not related to wp job manager, but try “[button” instead of “[su_button”. The second issue you will need to edit how you want the button to respond – if cannot do yourself you’ll need to hire someone.
The code has no syntax errors, so either the old code is still there causing duplicate functions error or it’s being pasted incorrectly.
Ah, I forgot php would see those as functions. I don’t know why this plugin adds $ for the javascript variables anyway. Last try, this should work.
function tawk_populate_user_info() { if (is_user_logged_in()) { $current_user = wp_get_current_user(); echo ' <script> $_Tawk_API.visitor = { name : "' . $current_user->user_firstname . ' ' . $current_user->user_lastname . '", email : "' . $current_user->user_email . '" }; </script>'; } add_action('wp_footer', 'tawk_populate_user_info',100);
Here’s revised code:
function tawk_populate_user_info() { if (is_user_logged_in()) { $current_user = wp_get_current_user(); echo " <script> $_Tawk_API.visitor = { name : '{$current_user->user_firstname} {$current_user->user_lastname}', email : '{$current_user->user_email}' }; </script>"; } else{ echo " <script> $_Tawk_API.hideWidget(); </script> "; } } add_action('wp_footer', 'tawk_populate_user_info',100);
Your Tawk.to code is different than mine. I guess because I use the code given by Tawk.to website rather than this plugin.
In my code, replace:
Tawk_API = Tawk_API || {};
with:
Tawk_API = $_Tawk_API || {};
@247web It’s currently not possible to pass anything other than the name and email address to Tawk.to. As far as current post/page they are on Tawk already does that – there is an activity timeline for every chat session.
Check the source of your page and ensure the javascript code is being placed in the footer. If it’s not – you’re either not logged in, the page is being cached, or your code is not in the current theme.
Yes it does :). Shows their name and email address in Visitor Monitoring before they even start a chat.
Forum: Reviews
In reply to: [Memcached Object Cache] Nothing but FatalYou don’t activate this plugin – you place it in wp-content folder. Read the installation page or search before leaving poor reviews:
https://www.ads-software.com/plugins/memcached/installation/Forum: Plugins
In reply to: [Query Monitor - The developer tools panel for WordPress] PHP Fatal errorSo does it break the whole site, break a certain functionality/page, or is it just an error randomly showing up in your logs? It’s likely and incompatibility with another plugin, in which case you can try disabling plugins 1 at a time until the error no longer appears.
Forum: Plugins
In reply to: [Clean Login] Cell Phone FieldHere ya go:
function mrb_modify_user_columns($column_headers) { unset($column_headers['posts']); $column_headers['phone'] = 'Phone'; return $column_headers; } add_action('manage_users_columns','mrb_modify_user_columns'); function mrb_user_phone_column_content($value, $column_name, $user_id) { $user = get_userdata( $user_id ); if ( 'phone' == $column_name ) { return '<a href="tel:' . $user->billing_phone . '">' . $user->billing_phone . '</a>'; } return $value; } add_action('manage_users_custom_column', 'mrb_user_phone_column_content', 10, 3);
If you don’t want to remove the posts count column, simply comment/remove the second line that says unset.
I just found Tawk.to today (very impressed) and asked them about this as well. They have a recently released API which makes what you’re asking possible:
https://www.tawk.to/javascript-api/I’ve coded a solution for you – place this in your functions.php file:
function tawk_populate_user_info() { if (is_user_logged_in()) { $current_user = wp_get_current_user(); echo " <script> Tawk_API = Tawk_API || {}; Tawk_API.visitor = { name : '{$current_user->user_firstname} {$current_user->user_lastname}', email : '{$current_user->user_email}' }; </script>"; } else{ echo " <script> Tawk_API = Tawk_API || {}; Tawk_API.hideWidget(); </script> "; } } add_action('wp_footer', 'tawk_populate_user_info',100);
Forum: Plugins
In reply to: [Clean Login] Cell Phone FieldIf anyone else would like this functionality..
On line 301 of clean-login.php add this line:
update_user_meta( $current_user->ID, 'billing_phone', sanitize_text_field( $_POST['phone'] ) );
On line 27 of content/login-edit.php, add this:
<div class="cleanlogin-field"> <label><?php echo __( 'Phone', 'cleanlogin' ); ?></label> <input type="text" name="phone" value="<?php echo $current_user->billing_phone; ?>"> </div>
There is obviously no phone validation though – it will accept anything. Compatible with (and without) WooCommerce.
Forum: Plugins
In reply to: [String locator] Stuck on "preparing search"?Around 50 plugins. The theme is not heavy duty nor would that have any impact as themes are not loaded into memory in admin. Memory usage per page load is around 15mb (using query monitor) with a 256mb limit.