The_post_thumbnailThe_post_thumbnail is mainly used in WordPress to print the thumbnails set in the article, and the Get_the_post_thumbnail function can return the HTML code you need as a string.
The use of The_post_thumbnail functions
The_post_thumbnail ($size, $attr)
function arguments
$size refers to the type of thumbnail you want. The default is ' Post-thumbnail ', which is the featured image.
$attr the property settings i
How to develop a mobile website using wordpress what is the difference between mobile website development and general website development? how to use wordpress to develop a mobile website ------ solution ---------------- wordpress has many adaptive plug-ins or themes, how to develop a mobile website
email is successfully sent.
Example
Basic email sending:
wp_mail( 'me@example.net', 'The subject', 'The message' );
Attachment and headers information:
$attachments = array( WP_CONTENT_DIR . '/uploads/file_to_attach.zip' );$headers = 'From: My Name
' . "rn";wp_mail( 'test@example.org', 'subject', 'message', $headers, $attachments );
Html mail and multiple mailboxes sent at a time:
$multiple_to_recipients = array( 'recipient1@example.com', 'recipient2@foo.example.com')wp_mail( $mul
email is successfully sent.
Example
Basic email sending:
wp_mail( 'me@example.net', 'The subject', 'The message' );
Attachment and headers information:
$attachments = array( WP_CONTENT_DIR . '/uploads/file_to_attach.zip' );$headers = 'From: My Name
' . "rn";wp_mail( 'test@example.org', 'subject', 'message', $headers, $attachments );
Html mail and multiple mailboxes sent at a time:
$multiple_to_recipients = array( 'recipient1@example.com', 'recipient2@foo.example.com')wp_mail( $mul
How to use wordpress to develop mobile websites what is the difference between mobile website development and general website development? how to use wordpress to develop mobile websites? wordpress has many adaptive plug-ins or themes, how to develop a mobile website using wordpres
PHP beginners, look at the wordpress source code found that the WP environment to establish a file wp-settings.php, almost all of the Wordpress contains files included, why not use autoload, do not include files have no impact on performance? PHP beginners, look at the wordpress source code found that the WP environment to establish a file wp-settings.php, almost
This article mainly introduces 10 commonly used MySQL queries when using WordPress. many users choose to use MySQL when using WordPress. This article is very useful for users who have just started, you can refer to most websites built using
you do not understand,Let's take another look ~
Add the following code to display the location of the custom navigation.
// Call the menu of nav1
Then you can add a menu in the background (the name should be a name or a Chinese character. Correction: preferably in English .)You can set what is displayed in the menu, not displayed, or even set the level of the navigation.
Filter out useless CLASS values in the custom menuIn the output of the WordPress
you do not understand,Let's take another look ~
Add the following code to display the location of the custom navigation.
// Call the menu of nav1
Then you can add a menu in the background (the name should be a name or a Chinese character. Correction: preferably in English .)You can set what is displayed in the menu, not displayed, or even set the level of the navigation.
Filter out useless CLASS values in the custom menuIn the output of the WordPress
The advantage of using wordpress to build a website is that you can use N-plus themes and N-plus Plug-ins. Many plug-ins are developed by users outside China due to the long term of use of wordpress abroad. Chinese support is not very good. We often encounter plug-in encoding problems when using WP. Today, the shadow w
subject ', ' the message ');
Attachment and headers information:
$attachments = Array (wp_content_dir. '/uploads/file_to_attach.zip ');
$headers = ' from:my Name
Html Mail and send multiple mailboxes at once:
$multiple _to_recipients = Array (
' recipient1@example.com ',
' recipient2@foo.example.com '
)
wp_ Mail ($multiple _to_recipients, ' The subject ', '
Other
This function is located at: wp-includes/pluggable.php
troubleshoot messages that cannot be s
First, I want to use some methods under this class and cannot directly call them. WordPress provides the global variable $ wpdb for this class, which is used to associate with the WordPress Database. Therefore, we need to define this global variable before using it. The code is as follows:Copy code Execute database queryUse the query function to execute any
its own program, check whether the password is successful with another function Checkpassword ($password, $stored _hash), the first is clear, the 2nd parameter is the password previously encryptedrequire_once ('./wp-includes/class-phpass.php ');//Original Password$passwordValue= "123456";//Generate password$WP _hasher=NewPasswordHash (8,TRUE);$sigPassword=$WP _hasher->hashpassword ($passwordValue);Echo"The generated password is:".$sigPassword;Echo"\ n";//Verify Password$data=$WP _hasher->checkp
Most use WordPress built site, after the table are MySQL database, often we need to customize the function of WordPress, here we list 10 most useful wordpress database query, you need a database management tools, such as phpMyAdmin or NAVICAT, etc. to execute these SQL statements.
1. Change the author of all documents to a different user
Before the change, you
Most use WordPress built site, after the table are MySQL database, often we need to customize the function of WordPress, here we list 10 most useful wordpress database query, you need a database management tools, such as phpMyAdmin or NAVICAT, etc. to execute these SQL statements.
1. Change the author of all documents to a different user
Before the change, you
This article mainly introduces the use of markdown when using prism to highlight the code, has a certain reference value, and now share to everyone, the need for friends can refer to
background: Recently the blog's article editor switched to Markdown, but found that WordPress theme comes with CSS can not implement code highlighting, as obsessive-compulsive disorder looked very uncomfortable, and then try to
) {
var J =doc.createelement ("script");
J.type = "Text/javascript"; J.async = true; J.SRC = "Jquery.js";
var s = doc.getelementsbytagname ("script") [0];
S.parentnode.insertbefore (J, s);
}) (document);
But as I've observed, most of the time we need to load synchronously, especially when you need to introduce jquery plug-ins.
Which version of jquery is used?
WordPress always comes with the latest jquery library, each version of the use
This article mainly introduces how to solve the problem that WordPress cannot comment after using CDN. It also reminds you to pay attention to the jQuery version support of WordPress, need a friend can refer to the comments-ajax.js In the cdn cache, many people encounter problems that cannot (use ajax) reply. In this regard, my previous practice is to prohibit cd
This article mainly introduces how to solve the problem that WordPress cannot comment after using CDN. it also reminds you to pay attention to the jQuery version support of WordPress, need a Friend can refer to the comments-ajax.js in the cdn cache, many people encounter problems that cannot (use ajax) reply. In this regard, my previous practice is to prohibit cd
is used in wordpress document form. When the document form is image, perform this operation for the image in this document form.In addition, use the following code in index. php: The code is as follows:Copy code $ Format = get_post_format ();If ('image '! = $ Format ){Remove_filter ('The _ content', 'gif _ content ');}Get_template_part ('content', get_post_format ()); Here, we need to determine if this hook is rem
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.