The method of WordPress managing the custom text at the bottom of the page
This article is about how WordPress manages custom text at the bottom of the page. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.
1. First find the code that adds custom content to the bottom of all articles
/ / add custom content function add_after_post_content ($content) {if (! is_feed () & &! is_home () & & is_singular () & & is_main_query ()) {$content. = 'custom content you need to add';} return $content;} add_filter ('the_content',' add_after_post_content') at the bottom of all articles
2. We need to copy this code into the functions.php of WordPress
Enter the background of WordPress, click "appearance"-"Edit", click "template" in the right column, and click "Theme Functions (functions.php)" to enter the editing interface of functions.php.
3. Then copy our code to the front of "/ / all over"
At this point, you just need to change the "custom content you need to add" to the text content you want.
Be sure to click "Update File" after the revision, or you will lose all your previous efforts.
Thank you for reading! On the WordPress management page at the bottom of the custom text method to share here, I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.