Wordpress articles are displayed in full text in the form of non single article browsing. If the more tag is inserted in a Wordpress article, the WordPress article will only be displayed to the more tag truncation, and then the "read more" and "continue reading" links will be displayed. Click the link to enter a single WordPress article to read, and the full text will be displayed.
Customize more label text one by one
Here are two good ways to define your more link text. The simplest one is to add custom text content when inserting the more tag into the article content. For example, if you need to change the default more to "know more", you can use the
more--> Replace the label with: Learn more -->
With this method, you can set unique text content for the more tag of any article in WordPress. This is a very popular place in WordPress,
The second is realized through the functions.php file. Theme authors like to control the more tag in the functions.php file, such as:
function my_more_link ($more_link, $more_link_text) { return str_replace($more_link_text, 'Read More' , $more_link); } add_filter( 'the_content_more_link' , 'my_more_link' , ten , two );
The "Read More" can be replaced by the text you think of, such as reading the full text
Third: through theme template file
But some friends found that their functions. php file did not contain this code, so what should we do? In fact, the theme of the blogger is not in this file, because the theme author directly wrote more in the template file, and checked the index file, archive file There will be multiple customized files in the category file and some topics. For example, the blogger needs to modify and replace the Read More file when looking for the_content. Note that these files need to be replaced one by one.
In fact, if there is a fourth and a fifth, there are still some similar ones. As long as you look carefully, you will find them,
In addition, if you find it troublesome to manually add more tags, you can automatically obtain any number of characters as a summary by setting this method. This method is the same as the third method to find that the topic contains the_content code,
For example, it is modified as:
Wherein, 200 means obtaining the first 200 characters
Related links:
Modify the more tag to display the full text in Chinese: https://ranlingqi.com/more.html
Wordpress more Label Complete Guide: https://www.douban.com/note/521768651/ (Recommended)