Home > Web Front-end > HTML Tutorial > WordPress code to obtain page article content_html/css_WEB-ITnose

WordPress code to obtain page article content_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:48:41
Original
1430 people have browsed it

The following is the specific relevant page content calling code:

The code for wordpess to call a certain page content is as follows:

<?php$article_id = 1; //页面的IDecho get_post($article_id)->post_content;?>
Copy after login

post_author: (integer) the number of the article author

post_data: (Characters) The date and time the article was published (YYYY-MM-DD HH-MM-SS)

post_data_gmt: (Characters) The Greenwich Mean Time (GMT) the article was published (YYYY -MM-DD HH-MM-SS)

post_content: (Characters) Post content

post_title: (Characters) Post title

post_category: (Integer) Post category serial number. Note: This value is always 0 in versions after WordPress 2.1. You can use the get_the_category() function when defining the category of an article.

post_excerpt: (Characters) Post summary

post_status: (Characters) Post status (publish|pending|draft|private|static|object|attachment|inherit|future)

comment_status: (char) comment status (open|closed|registered_only)

ping_status: (char) pingback/trackback status (open|closed)

post_password: (char) post password

post_name: (Characters) URL nesting of the post

to_ping: (Characters) URL link to be quoted

pinged: (Characters) quoted link

post_modified: (Characters) The last modified time of the article (YYYY-MM-DD HH-MM-SS)

post_modified_gmt: (Characters) The last modified GMT time of the article (YYYY-MM-DD HH-MM-SS)

post_parent: (integer) Parent post number (for attachments, etc.)

guid: (Character) A link to the post. Note: You cannot use a GUID as a permanent link (although it was indeed treated as a permanent link in versions prior to 2.5), nor as an available link to an article. A GUID is a unique identifier that currently happens to be a link to an article.

post_type: (chars) (log | page | attachment)



source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template