Muhibul Haque
Forum Replies Created
-
Forum: Plugins
In reply to: [Bandsintown Events] Bandsintown Plugin not working on WordPress websiteHi @surreystreeter,
You can add customise the code from this page: https://artists.bandsintown.com/support/blog/install-events-widget and add as HTML code on your website. Plugins is not working for me. So, I solved with this page.Best of luck!
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Jetpack docs out of dateHi @crozynski
I understand how frustrating it can be when the documentation doesn’t seem to match what you’re seeing. Thank you for reaching out, and I’ll do my best to help!
I tested this on a fresh WordPress installation and found the My Jetpack option available, as mentioned in the documentation. Possibly you’re not seeing this option because you’re using an older version of Jetpack. Could you please check your Jetpack version and update it to the latest one if needed?
Best regards,
Muhibul HaqueHi there!
Thanks for reaching out!I found some similar ticket that might help you.
Best of luck!
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] A sudden drop in subscribersHi @roosakyl
Thank you for the follow-up. I’m not aware of any APIs being deleted, but I believe @erania-pinnera or someone else from the team might be able to confirm this for you.
Best regards,
Muhibul- This reply was modified 1 year, 1 month ago by Muhibul Haque.
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] A sudden drop in subscribersHi @roosakyl
I know it’s really disappointing to see sudden fall of subscribers. However, thanks for reaching out! I found a similar ticket that might help you.
Best Regards
MuhibulForum: Fixing WordPress
In reply to: Only admins can post links in comments.Hi @shimist
No problem! This can happen. The next step is to inspect our code. Could you please open the source code of your single page and verify that the script is loading correctly? Since we’ve enqueued the custom-comment-block script, search for this ID in the source code to confirm that the custom-comment-block.js file is being loaded.
If the file path is incorrect, the script won’t enqueue properly, and without the script running, it won’t work as expected. So, please check if the JS file is loading correctly. If you can share the site link where you’re demonstrating the issue, it will help us inspect it more effectively.
Best Regards
Muhibul- This reply was modified 1 year, 1 month ago by Muhibul Haque.
Forum: Fixing WordPress
In reply to: Only admins can post links in comments.Hi @shimist
Thanks for the update! I am glad the code is working now. As you mentioned you want to filter along with www as well, here is the modified code for PHP based solution.
function block_links_in_comments($commentdata) {
if (current_user_can('manage_options')) {
return $commentdata;
}
// Prevent comments that contains https://, http:// or www
if (preg_match('/(https?:\/\/|www\.)[^\s]+/', $commentdata['comment_content'])) {
wp_die(__('Posting links in comments is not allowed.', 'text-domain'));
}
return $commentdata;
}
add_filter('preprocess_comment', 'block_links_in_comments');Alternative solution:
But as you mentioned you want to display the alert message in a splash screen. Then you can try this second method that will display the error message in splash screen. But this method requires a little bit of JavaScript.
You can create a folder called js (if it doesn’t already exist) in your theme directory, and inside this folder, create a file called custom-comment-block.js. Then, in your functions.php file, add the following code to enqueue the JavaScript file:
function add_custom_comment_script() {
if (is_singular() && comments_open()) {
wp_enqueue_script(
'custom-comment-block',
get_template_directory_uri() . '/js/custom-comment-block.js',
['jquery'],
null,
true
);
}
}
add_action('wp_enqueue_scripts', 'add_custom_comment_script');After enqueuing the file, we need to add the jQuery code that will help us displaying the error message in a splash screen or alert box.
jQuery(document).ready(function ($) {
$('#commentform').on('submit', function (e) {
var commentContent = $('#comment').val();
var regex = /(https?:\/\/|www\.)[^\s]+/;
if (regex.test(commentContent)) {
e.preventDefault();
alert('Posting links in comments is not allowed.');
}
});
});Note: Use either method; there’s no need to implement both.
I hope this will help! Let me know if you need further assistance.
Best of luck!
Muhibul- This reply was modified 1 year, 1 month ago by Muhibul Haque.
Forum: Plugins
In reply to: [WooCommerce] Hide filters on Shop page & main categoriesHi @stravojohn
I understand you want some customisation based on XStore theme and WooCommerce. Thanks for posting detailed requirements here, but unfortunately this is out of WooCommerce support scope. I recommend reaching out to the theme developer, as they have the best understanding of their product’s structure and can provide the most effective customisation support.
However, you can consult with developers by joining WooCommerce Community Slack or you can check third-party services that some users have found helpful, such as Woo Agency Partners.
Have a nice day!
Muhibul Haque
Forum: Fixing WordPress
In reply to: Moved hosts, lost links to pagesThat’s great, thanks for sharing the update!
Have a nice day!
Best Regards
Muhibul HaqueForum: Fixing WordPress
In reply to: Only admins can post links in comments.Hi @shimist
I tried with https:// version, it was working fine. The code is preventing https:// version in my website. Did you try with https:// or http://
Please let me know.
Forum: Fixing WordPress
In reply to: Only admins can post links in comments.Hi @shimist
Thanks for reaching out! You can use the preprocess_comment filter, which will allow you to inspect and modify the comment data before it’s saved.
function block_links_in_comments($commentdata) {
if (current_user_can('manage_options')) {
return $commentdata;
}
// Check if the comment contains a link
if (preg_match('/https?:\/\/[^\s]+/', $commentdata['comment_content'])) {
wp_die(__('Posting links in comments is not allowed.', 'text-domain'));
}
return $commentdata;
}
add_filter('preprocess_comment', 'block_links_in_comments');Using the current_user_can(‘manage_options’) you can checks if the commenter is an admin. If it’s admin user, they can post links.
Forum: Fixing WordPress
In reply to: Moved hosts, lost links to pagesHi @ericmacknight
Thanks for reaching out! It seems the issue happening for permalink issue. I’d like you to try resetting the permalink from Settings > Permalinks. Hit the save button, this will reset your permalink structure and try to revisit the pages.Also, check Settings > General and make sure new site URL is updated.
Have a nice day!
Forum: Fixing WordPress
In reply to: Critical Error / Don’t know email associated with accountHi @vaporgenie
I understand how frustrating it is to experience downtime on a website. Since this issue happened after installing a plugin, I can help you fix it quickly.As you cannot access the WordPress dashboard right now, I suggest using cPanel or FTP to access your WordPress files. Go to the File Manager and open the public_html folder. Find the folder for your website and open it. Inside that folder, open the wp-content folder, then look for the plugins folder. Right-click on the plugins folder and rename it to something like plugins_old. This will deactivate all the plugins. For recovering using FTP, check this guideline.
You can then access to your WordPress dashboard and activate all the plugins except the plugin causing errors.
Please let me know if you need further assistance!
Forum: Plugins
In reply to: [Gutenberg] Slow loading of editorHi Zoran,
At least we now have clarity on where the problem is occurring. Since the issue is related to hosting, it is the hosting provider’s responsibility to resolve it.As it appears to be related to their server configuration. They should address it by adjusting the server settings. Specifically, ask the hosting provider about the server’s PHP version, memory limit, and any caching mechanisms in place.
Gutenberg is built on JavaScript, it relies on technologies such as Node.js and React.js to function effectively. Confirm with the hosting provider whether their server environment fully supports these technologies.
Have a nice day!Forum: Plugins
In reply to: [Gutenberg] Slow loading of editorHi @grubisa13
I’m sorry to hear that you’re still experiencing issues with a slow editor. I set up a demo website to test the editor’s performance, and it appeared to work efficiently and quickly.
Here you can check the video: https://share.cleanshot.com/2PcNqLKt
Since the issue persists, here are a few things I’d like you to try:
- Deactivate Gutenberg Plugin: If you’re using the Gutenberg plugin, try disabling it and using the built-in WordPress editor to see if that improves performance.
- Browser Performance: Ensure your browser is up to date and not overloaded with extensions that could slow down performance. Try using incognito mode or a clean browser install to see if there are any extensions causing the issue.
- Hosting Provider: Ensure your hosting provider offers sufficient resources needed for smooth WordPress performance. You can test the same setup on different servers and compare the performance to determine whether your hosting is causing the slowdown.
Please let me know if you have any other questions!