Alex Moise
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Resetting comment field in codeWelcome @janew, happy to know it worked!
Yeah, it will become a bit easier with Gutenberg and full site editing, but from that point on, the code will still do wonders … it always does π
Have a great day,
Alex.Forum: Fixing WordPress
In reply to: Resetting comment field in codeHi @janew , we’re going to do it the other way around, basically saying “if not user logged in then proceed…”
For that we’ll wrap the “if a comment field is set” part with another if, checking for the negative of “is_user_logged_in()” by just putting a “!” in front of it π
Like this:
// remove default comment form so it won't appear twice add_filter( 'comment_form_defaults', 'mo_remove_default_comment_field', 10, 1 ); function mo_remove_default_comment_field( $defaults ) { if ( !is_user_logged_in() ) { if ( isset( $defaults[ 'comment_field' ] ) ) { $defaults[ 'comment_field' ] = ''; } } return $defaults; }That’s all, please let me know if it does what you need.
Best regards,
Alex.Forum: Fixing WordPress
In reply to: Change βCommentsβ form (bis)Hi @janew , that could be easily done by adding an IF in the mo_remove_default_comment_field() function, checking for is_user_logged_in() condition or something similar.
If you need help with that please open a new topic and mention me there and I’ll have a closer look – just to avoid any trouble we both could get in by “hijacking” an old topic π
Best regards,
Alex.- This reply was modified 5 years, 5 months ago by Alex Moise.
Forum: Fixing WordPress
In reply to: Intermediary services pluginWelcome Miguel! Have fun!
Forum: Fixing WordPress
In reply to: Intermediary services pluginHi @mgo3, that would be possible with a Marketplace plugin, sometimes called Multi Vendor.
Woocommerce has one here and there are quite a few others, like Dokan, WCFM Marketplace, WC Marketplace etc.
These, coupled with some incentive/gamification features like free samples or affiliate coupons (if your sellers agrees of course), can become a very powerful selling tool πForum: Fixing WordPress
In reply to: Change βCommentsβ form (bis)Hi @bdorat, the result of that code depends on the theme CSS,
Could you post the URL where are you trying to put these 3 fields on one line? I can have a look and maybe I can come up with a CSS snippet to achieve your goal on your particular page π
Have a wonderful day!
Alex.Forum: Themes and Templates
In reply to: [Storefront] Customizing the Product reviews in Product pagesHi @wpguillaume, planning is done, only need to find the time to write the code, test it and deploy it. Sorry for delay, things became crowded here and side projects take longer than I’d like now ..
Have a great week!
Alex.Forum: Themes and Templates
In reply to: [Storefront] Customizing the Product reviews in Product pagesHi @wpguillaume, sorry for delay, you mean the text “Your review is awaiting approval” that shows up right after someone comments doesn’t show anymore with the plugin activated. Also there’s no preview of the comment at all, so the user doesn’t know if the comment was actually submitted.
Tested and I can reproduce the above, so I’ll research the cause of this and will come back with a version that fixes this. Thanks for raising this up!
Have a great weekend!
Alex.Forum: Themes and Templates
In reply to: [Storefront] Customizing the Product reviews in Product pagesYou’re welcome & thanks for feedback! π
Now, making the Name required would need that part of form to be rewritten, but even though a visitor can write just about anything there, like “Anonymous” for example which is otherwise default – so not sure if that would be useful in the long run.
Thing is, the whole mechanism with email and user registration is in place to make sure the commenters are real users.For the other issue plese look in Settings -> Discussion for an option named “Comment must be manually approved”. If that is activated then that’s the cause, please deactivate it and and submit a comment to see if that solves it.
Have a wonderful day!
Alex.Forum: Themes and Templates
In reply to: [Storefront] Customizing the Product reviews in Product pagesHi @wpguillaume, problem is not the theme, is that the plugin wasn’t initially made with WooCommerce in mind – but now I just made it compatible π Thank you for raising this up.
Now you only need to uninstall, re-download and install the new version of that plugin and it should just work.
The new version (WooCommerce compatible) is 1.0.6 if you ever need to check in Wp-Admin -> Plugins.
Please come back and let me know if it does the job for you – thanks!
Have fun!
Alex.Forum: Fixing WordPress
In reply to: Photo club website: user galleries?Hi Damien, glad to hear that!
The UI can be easily styled because it’s in the front end actually and any custom CSS code added in Customizer will do π
Had no idea that USP already offers size limits, I believe it didn’t long time ago – thanks for heads up!Alex.
Forum: Fixing WordPress
In reply to: Photo club website: user galleries?Hi Damien,
That is definitely possible, with a trick π I did it already some years ago, using these:
1. For the user submission form in the front end there is this plugin:
https://ww.wp.xz.cn/plugins/user-submitted-posts/ It can be configured to allow more images for one post and the images get attached to that post.2. Use a function to add the [gallery] shortcode after post content (that’s the trick). If that’s too technical then use an Ad Inserter plugin like this one https://ww.wp.xz.cn/plugins/ad-inserter/ and consider the shortcode as an Ad to be inserted after content.
Beyond that I believe there are a lot of plugins which take that shortcode and style the gallery in countless ways – just need to try a few. There are also paid options that does the same (I ended up using one)Other than that I believe it’s important to have a mean to control the image sizes – and for that there’s https://ww.wp.xz.cn/plugins/imsanity/ which adjust image size on-the-fly at upload.
I still have that website and just checked it and still works π Don’t know if I’m allowed to link it here but if you need more details please ask me and I’ll gladly help with the info I have.
Regards,
Alex.Forum: Fixing WordPress
In reply to: how do i fix my child theme?Hi Kanger,
First thing coming to my mind is how did you disabled the child theme without access to wp-admin? π
Now, assuming you have FTP or some other kind of file access to the website the best way is to enable debug mode and look in the log file,
For this open the wp-config.php file situated in the root of your website and replace anything you have about debug there ( by default one line: “define(‘WP_DEBUG’, false);” ) with these:define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 );Then make sure you have the troublesome child theme active, go to your wp-admin page (that will be blank), then open the “debug.log” file inside the /wp-content/ directory – there will be the thing that caused the blank screen.
Don’t forget to change back “‘WP_DEBUG’, false” when finished πAnother place to search for information about this is the web server logs (Apache?) – access to this log is provided by your hosting provider somewhere in your web hosting control panel.
Good luck!
Alex.Forum: Networking WordPress
In reply to: SSL in subdomainYou would need a wildcard certificate for that to work. A wildcard certificate would cover you for all your subdomains,
I see you are using a free Let’s Encrypt certificate for your main domain and you are hosted on Plesk,
Now, you could get a wildcard certificate from Let’s Encrypt but not automatically in Plesk, because Plesk extension doesn’t support that yet, as declared yesterday here: https://support.plesk.com/hc/en-us/articles/115000490174-Is-it-possible-to-use-Let-s-Encrypt-for-wildcard-certificates-
So, you would need to generate the custom wildcard certificate by yourself, starting details here: https://zerossl.com/ssl-faq.html#Do_you_support__wildcards___so_I_could_use_one_certificate_for_any_name_in_my_domain_
Then upload your custom certificate in Plesk following this steps: https://support.plesk.com/hc/en-us/articles/213946825 section “Purchased or custom SSL certificate”Regarding the WordPress part, you would need to use a translation plugin like WPML, or Loco Translate combined with qTranslate-X, configured with language subdomains.
Cheers!
Alex.Forum: Fixing WordPress
In reply to: Hide email and website fields for comments?Hi Sam,
Please add the following code in the functions.php file of your child theme to change the commenter “Name” into “Nickname”:
// change "Name" label in comments form add_filter( 'comment_form_default_fields', 'mo_comment_name_field_custom_html' ); function mo_comment_name_field_custom_html( $fields ) { // first unset the existing author field: unset( $fields['author'] ); // ... then re-define it as needed: $new_author = '<p class="comment-form-author">' . '<label for="author">' . __( 'Nickname', 'textdomain' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" maxlength="245"' . $aria_req . $html_req . ' /></p>'; // ... and put it on top of the fields array: array_unshift($fields, $new_author); // done customizing, now return the fields: return $fields; }I would appreciate a bit of feedback on these last 2 changes: are they working as expected on your website?
Thanks!
Alex