WordPress Article form:
Aside-----------------log: Standard article with no title displayed
Image--------------Images: Single image. The first tag in the article will be considered as the image.
Video---------------Videos: Single video.
Quote-----------------Quote: Quote another word.
Link-----------------Links: links to other websites.
Gallery---------------Album: Image showroom.
Status--------------state: A short update, typically up to 140 characters. Similar to Weibo
Audio----------------: An audio file
Chat------------------Chats: Chat History
If you want to add support for these forms, add the type aliases for the above list in the functions.php corresponding array
Array (' aside ', ' image ', ' video ', ' quote ', ' link ', ' Gallery ', ' status ', ' Audio ', ' chat ');
How can different types of articles be displayed in different styles? Integrate article styles to output different formats in single.php by Has_post_format judging the type of the article:
<?phpif(Has_post_format (' status ')) {//Status?>State Style<?php}Else if(Has_post_format (' aside ')) {//Log?>Log Style<?php}Else if(Has_post_format (' gallery ')) {//album?>album Style<?php}Else if(Has_post_format (' video ')) {//Video?>Video Style<?php}Else if(Has_post_format (' Audio ')) {//Music?>music Style
//....<?php}Else{//Standard?>General Style<?php}?>
Add article Type plugin: Custom Post type UI
WordPress Theme Creation Tutorial 9: Article form