In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you wordpress through the ID of the current article to get a brief introduction to the title of the article, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
How does wordpress get a brief introduction to the title of the article through the ID of the current article?
Wordpress uses a lot of information to get the information of the article through the ID of the current article. In the secondary development of wordpress, the last article said, get the id of the current article and the number of comments on the current article. In fact, as long as you get the id of the current article, you can get a lot of information!
The code is as follows:
The information that can be obtained through get_post ($id)-> is:
Post_author: (integer) the number of the author of the article
Post_data: (character) date and time the article was published (YYYY-MM-DD HH-MM-SS)
Post_data_gmt: (character) Greenwich mean time (GMT) (YYYY-MM-DD HH-MM-SS) of the article published
Post_content: (character) content of the article
Post_title: (character) title of the article
Post_category: (integer) the number of the article category. Note: this value is always 0 after WordPress 2.1s. You can use the get_the_category () function when defining the categories of articles.
Post_excerpt: (character) article summary
Post_status: (character) Article status (publish | pending | draft | private | static | object | attachment | inherit | future)
Comment_status: (character) comment status (open | closed | registered_only)
Ping_status: (character) pingback/trackback status (open | closed)
Post_password: (character) article password
Post_name: (character) URL nesting of articles
To_ping: (character) URL link to be referenced
Pinged: (character) referenced link
Post_modified: (character) the last modification time of the article (YYYY-MM-DD HH-MM-SS)
Post_modified_gmt: (character) the last modified GMT time of the article (YYYY-MM-DD HH-MM-SS)
Post_parent: (integer) parent article number (for attachment, etc.)
Guid: (character) A link to an article. Note: GUID cannot be used as a permanent link (although it was treated as a permanent link in versions prior to 2.5), nor can it be used as an available link to an article. GUID is a unique identifier that just happens to be a link to the article right now.
Post_type: (characters) (log | page | attachment)
Post_mime_type: (character) Mime type (for attachments, etc.)
Comment_count: (integer) Total number of comments
The above is all the contents of the brief introduction of the article title obtained by wordpress through the ID of the current article. Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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: 295
*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.