Anton Vlasenko
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Set New Password button not working@mattocmp I’ve tried to reproduce it again and it changes the password every time.
Do you have any plugins installed?Forum: Fixing WordPress
In reply to: Set New Password button not workingHm, I can’t reproduce this issue.
I’m sorry, but I have to ask this question just to be sure.
Are you sure you are clicking on the “Update User” button at the bottom of the page after you change password for a user?
Do you see “User updated” notification at the top the page when the page gets reloaded?- This reply was modified 3 years, 3 months ago by Anton Vlasenko.
- This reply was modified 3 years, 3 months ago by Anton Vlasenko.
- This reply was modified 3 years, 3 months ago by Anton Vlasenko.
Forum: Fixing WordPress
In reply to: How to change href lang on single pages/posts?@ralphmuc I’ve just realised that my code will not work for posts, it only works for pages.
I’ve updated it so now it should work for both posts and pages.add_filter('locale', 'change_page_locale'); function change_page_locale( $default_locale ) { $pages_to_change_locales_for = [ 'my-post-or-page-url' => 'de-AT', ]; foreach ($pages_to_change_locales_for as $slug => $locale) { if (is_page($slug) || ($slug === get_post_field('post_name'))) { return $locale; } } return $default_locale; }
Of course, you will have to replace my-post-or-page-url with the actual slug of your page or post.
Please let me know if it works.
I’ve tested it on WP 5.7.2 and twenty seventeen theme and it should be working.
Forum: Fixing WordPress
In reply to: I cannot reach the site.Unfortunately that error message doesn’t help much.
I suggest you to do the following.
Please enable WP_DEBUG and WP_LOG settings. See this article on how to do this.
Try to load your site again, open your WordPress log error file and post the output here, so somebody could help you with the issue.Forum: Fixing WordPress
In reply to: WordPress insering + signs between names in commentsI can’t reproduce this using WordPress 5.8 with no plugins.
There have been similar issues before, e.g. this or this.
They all were related to plugins, so I’d assume this issue is also plugin related.
I’d disable plugins one by one to see which one of them causes the issue.- This reply was modified 3 years, 4 months ago by Anton Vlasenko.
Forum: Fixing WordPress
In reply to: WordPress Max Upload BugI don’t quite get what you mean by
I don’t think $u_bytes and $p_bytes should be passed.
It only passes either $u_bytes or $p_bytes, depending on which variable has the lowest value.
And you wroteThe PHP max_upload_size and max_post_body size were both set to 64M.
But wp_max_upload_size function reads upload_max_filesize and post_max_size ini values, no the values you mentioned. Is it a typo?
- This reply was modified 3 years, 4 months ago by Anton Vlasenko.
Forum: Fixing WordPress
In reply to: Notice: Trying to get property ‘post_status’ of non-objectI’m looking at the source code and I can say this is somehow related to the navigation menu in the admin section.
It’s hard to tell something more specific without having access to your website.- This reply was modified 3 years, 4 months ago by Anton Vlasenko.
Forum: Fixing WordPress
In reply to: Image caption background color@dla23 You are welcome. I’m glad we were able to help.
Forum: Fixing WordPress
In reply to: How to change href lang on single pages/posts?Hi @ralphmuc,
I’m not sure if I understand you correctly, but you don’t have to use whole URL as a URL slug.
You just need to use the part of the URL after the server name, e.g. “my-post-or-page-url”.For the example that you provided, you need to use the following code:
add_filter('locale', 'change_page_locale'); function change_page_locale( $default_locale ) { $pages_to_change_locales_for = [ 'my-post-or-page-url' => 'de-AT', ]; foreach ($pages_to_change_locales_for as $slug => $locale) { if (is_page($slug)) { return $locale; } } return $default_locale; }
If you tell me your WordPress version I can test this snippet on that particular WordPress version to make sure it works.
- This reply was modified 3 years, 4 months ago by Anton Vlasenko.
Forum: Fixing WordPress
In reply to: Where and How to find plugin patch file@yanj2004 I’m wondering why it’s needed to patch the files after the standard plugin update procedure. The standard plugin update functionality should be enough.
I’d appreciate if you posted a link to this “WordPress update document”.
It’s just for my curiosity.Forum: Fixing WordPress
In reply to: Where and How to find plugin patch fileHow do we know if a plugin has patch file
I suppose you have to search for .patch files in the plugin’s directory.
Where can we find these related information?
I’d suggest to read plugin’s documentation.
But I’m just wondering why the standard approach to updating plugins doesn’t work for you.
- This reply was modified 3 years, 4 months ago by Anton Vlasenko.
- This reply was modified 3 years, 4 months ago by Anton Vlasenko.
Forum: Fixing WordPress
In reply to: Moving Posts and UsersI heard some people use this plugin to import/export their data (this is not an advertisement, it’s just my observation).
However I have no idea if it will suit your needs.Forum: Fixing WordPress
In reply to: WordPress 5.8 Still Rejects WebP ImagesAs far as I can tell support for WebP images should be enabled in ImageMagick and/or GD PHP extensions to make this work.
WordPress is unable to process WebP images if ImageMagic or GD don’t support that.
You need to discuss this issue with your hosting provider and enable support for WebP images in PHP.Forum: Fixing WordPress
In reply to: Image caption background color@dla23 To customise colour of the caption, you need to do the following:
Go to Settings -> Customise (Themes pane) -> Additional CSS
Copy-paste this css snippet into the text area:.wp-caption p.wp-caption-text { background-color: #ff00ff; }
Change #ff00ff to the color you need.
Forum: Fixing WordPress
In reply to: Cant Create pages or posts after update@jdog131 If you see blank pages, you need to understand why it is happening.
WordPress hides PHP errors by default.
To show them, you need to enable WP_DEBUG option.
Please see this article on how to do it.
When you enable it, try to load a page or a post again.
You should see a specific PHP error that prevents your pages from loading.
Please post it here so someone can look into it (or just ping me).