Add interference codes to wordpress to prevent collection. Open the post-template.php under wp-uplodes and add the code to the reference content below the first line of the post-template.php: functionRndString ($ body) {Maximum interval distance (if the post-template.php under wp-pair des is not enabled during detection
Add
After installing the new theme theme, through the control Panel's customize function, you can enter the custom interface, you can see a lot of options, how to add such options?First, find the customize_register corresponding function in the inc/customizer.php of the topic and add the following: $ wp_customize - add_setting (' Blog_disp ', Array(' Sanitize_callback ' = ' Astrid_sanitize_checkbox ', )
Problem DescriptionFriends of wp all know that there are only four wordpress comment form fields, including nicknames, email addresses, URLs, and content. Comments are included in the wp_comments table, if you want to add other additional fields, you have to find another method, for example, tel phone field.SolutionWp_comments also has a corresponding meta table named wp_commentmeta. The Posts article table
The first step: To add the floor number display in the comments, that is to change the WordPress comments internal structure.The second step: WP in the comments are unified marking. In other words, a comment labeled 256 does not know how many floors it should be in a log. So it's up to us to tell it. For example, suppose the comments in a log are No. 201, No. 207, and No. 311, where No. 311 is the sub-reply
the official website to download, you can also use my compressed package inside. The jquery library can then be introduced in header.php or footer.php.
1
Four, JS:Before adding the JS file, you need to modify the Spig.js file, open the file, use the editor's "Replace" tool to replace the www.shenjieblog.com with your URL, but it is best to manually replace it, then it is better to change some words, such as my name.Next, also under the subject's footer.php file
by the following code:
Function kses_init (){Kses_remove_filters ();
If (Current_user_can ('unfiltered _ HTML ')= False)Kses_init_filterS ();}
Add_action ('init ', 'kses _ init ');Add_action ('set _ CURRENT_USER ', 'kses _ init ');
At this time, it is found that the current user does not have the unfilter_html permission.
Solution
1. TryWp_filter_post_kses is removed using the remove_filter function, but this shows a problem of the sequential relationship between add_filter an
When you do WordPress theme, you often need to add management options to the theme so that you can provide some custom settings to the subject user, lest you change the subject source code. There are already a lot of people on the Web sharing tutorials, last night to write code when suddenly to use this function, but search a lot of versions, only to find or neoease version of the most convenient, in view o
This article mainly introduces the WordPress background add sidebar menu, has a certain reference value, now share to everyone, have the need for friends can refer to
Add_action (' Admin_menu ', ' register_custom_menu_page '); function Register_custom_menu_page () { add_menu_page (' custom menu title ', ' Test menu ', ' Administrator ', ' show_ads/view.php ', ' ' , Plugins_url (' Myplugin/image
. $subject = ' You are in ['. Get_option (' Blogname '). ' The message has a reply '; $message = ' Method Four: Support for nested and @ user-style comment remindersThis method is reproduced from zww.me, this version of the comment reply notification is supported nested and @ user mode. If you have any questions, please go to the author page for feedback./* Mail notification by Qiqiboy */function comment_mail_notify ($comment _id) {$comment = Get_comment ($comment _id);//Get this comment-rela
Using a text editor, open the functions.php in the current theme directory and add the following codeCurrent_user_can (' contributor ') ! Current_user_can (' upload_files ')) Add_action (' allow_contributor_uploads ');Allow_contributor_uploads () {Get_role (' contributor ');$contributor-Add_cap (' upload_files ');}Once the above code has been executed once, the contributor's permission settings will be stored in the database, and even if you remove
Sometimes we want to write an article on a blog siteArticleProvides the resource download function. displaying a Download button is easier to understand than a URL. If you use Wordpress to build a website, you can use a Custom font to implement this function. PHP file, find ""Code, Add the following code under it:
After the topic is modified, you can call the Download button link to
WordPress thickbox Add "view artwork" effect code
function Tb_show (caption, URL, imagegroup) {//function Called when the user clicks on a thickbox link
try {Code omitted ...tb_nexthtml = "";Tb_imagecount = "";Tb_foundurl = false;Open a new window to display the original artworktb_opennewhtml = "";
if (imagegroup) {///code omitted ... if (tb_foundurl) { Tb_nextcaption = Tb_temparray[tb_counter].titl
First look at the effect:What's the use of this? After adding the @ feature, the hierarchical relationship between those user reviews is clear, and we can clearly see who sent the comments to whom. In fact, mainly to enhance the force lattice.Implementation method:Add the following code to the function.php
123456789
//为你的评论回复添加@功能function shenjie_com_comment_add_at( $comment_text, $comment = ‘‘) {if( $comment->comment_parent > 0) {/*下面这句代码中的color你可以自定义*/$comment_text = ‘ . $comm
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.