In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you what to do when the WordPress 5. 5 reply button fails. I hope you will get something after reading this article. Let's discuss it together.
Some children's shoes found that the reply button failed after upgrading WordPress 5.5, which occurred in WordPress 5.1. Most of the problems occurred in topics that customized comment functions or used Ajax comments.
The symptom is that you click the reply button to refresh the page, and the comment form cannot be nested.
The cause of the problem is the WordPress developer, who modified the comment core file. After testing, it seems that the comment-reply.js file in the wp-includes\ js directory has been modified, and after replacing it with the 5.4.2 version, the problem disappears.
The same problem occurs twice, a little too regardless of thousands of theme users, there is no clear documentation, just messing around with the block editor.
As a workaround, try adding the following code to the theme functions.php:
Add_filter ('comment_reply_link',' mytheme_replace_comment_reply_link', 10, 4); function mytheme_replace_comment_reply_link ($link, $args, $comment, $post) {if (get_option ('comment_registration') & &! Is_user_logged_in () {$link = sprintf ('% login_text' (get_permalink ())), $args ['login_text']);} else {$onclick = sprintf (' return addComment.moveForm ("% 1$ s talk% 2$ s", "% 2$ s", "% 3$ s", "% 4$ s")', $args ['add_below'], $comment- > comment_ID, $args [' respond_id'], $post- > ID) $link = sprintf ("% s", esc_url (add_query_arg ('replytocom', $comment- > comment_ID, get_permalink ($post- > ID). "#". $args ['respond_id'], $onclick,esc_attr (sprintf ($args [' reply_to_text'], $comment- > comment_author)), $args ['reply_text']);} return $link;}
This method was previously used in WP5.1, but it is also applicable to W5.5, and the class in it can be modified appropriately to adapt to its own topic structure.
The code that comes with the program is located in the wp-includes directory, comment-template.php, on about 1817 lines
Source code: https://wp-kama.ru/function/get_comment_reply_link
In addition, WordPress 5.5 is not compatible with themes and plug-ins, and there are a lot of problems on the official website.
Because there is no security update for WordPress 5.5, and there is no Chinese version, there are a lot of foreign languages in the background in the previous language files. At present, I have not upgraded myself, and it is estimated that the Chinese version will be a long way off this time.
WordPress 5.5 update focus is still tossing about the block editor, against the opposition of the vast majority of people, painstakingly develop new features of the block editor, if the developer saw the "Classic Editor (Classic Editor)" switch plug-in, 5 + million downloads and installations, I do not know what it will be like.
The official said that after 2022, the classic editor will be completely removed. If there is no substitute, it will be a disaster for the majority of users and a great loss for WordPress. Some people will abandon WordPress and switch to other programs.
After reading this article, I believe you have a certain understanding of "WordPress 5.5 reply button failure". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for your reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.