List some long-time tag calls in wordpress development, which is very practical. In fact, I often use this to view tags. I can't remember this much. let's take a look.
List some long-time tag calls in wordpress development, which is very practical. In fact, I often use this to view tags. I can't remember this much. let's take a look.
Common template tag functions:
<? Php bloginfo ('name');?> : Blog name
<? Php bloginfo ('URL');?> : Blog Url
<? Php bloginfo ('demo-: ion');?> : Blog description
<? Php bloginfo ('stylesheet _ url');?> : CSS file path
<? Php bloginfo ('pingback _ url');?> : PingBack Url
<? Php bloginfo ('Template _ url');?> : Template file path
<? Php bloginfo ('version');?> : WordPress version
<? Php bloginfo ('Atom _ url');?> : Atom Url
<? Php bloginfo ('rss2 _ url');?> : RSS 2.o Url
<? Php bloginfo ('HTML _ type');?> : Webpage Html type
<? Php bloginfo ('charset');?> : Webpage code
<? Php wp_title ();?> : The title of a specific content Page (Post/Page)
<? Php get_header ();?> : Call the Header template
<? Php get_sidebar ();?> : Call the Sidebar template
<? Php get_footer ();?> : Call Footer template
<? Php the_content ();?> : Display Content (Post/Page)
<? Php the_time ('string')?> : Display time. For more information, see related PHP functions.
<? Php comments_popup_link () ;?> : The message link in the text, which is opened in the current window.
<? Php comments_popup_cript :();?> : Message link in the body, which is opened in a new window.
<? Php the_title ();?> : Content Page (Post/Page) title
<? Php the_permalink ()?> : Content Page (Post/Page) Url
<? Php the_category (',')?> : Category of a specific content Page (Post/Page)
<? Php the_author ();?> : Author
<? Php the_ID ();?> : Specific content Page (Post/Page) ID
<? Php edit_post_link ();?> : If the user has logged on and has permissions, the edit link is displayed.
<? Php get_links_list ();?> : Display links in Blogroll
<? Php comments_template ();?> : Call the message/reply template
<? Php wp_list_pages ();?> : Display Page List
<? Php wp_list_categories ();?> : Display the Categories list
<? Php next_post_link ('% link');?> : Next article link
<? Php previus_post_link ('% link');?> : Link to the previous article
<? Php get_calendar ();?> : Calendar
<? Php wp_get_archives ()?> : Display content archival
<? Php posts_nav_link ();?> : Navigation, displaying the link of the previous or next article
<? Php include (TEMPLATEPATH. '/filename');?> : Embed other files, which can be customized templates or other types of files
<? Php _ e ('message');?> : Output corresponding information
<? Php wp_register ();?> : Display registration link
<? Php wp_loginout ();?> : Display logon/logout links
<! -Next page->: pagination of the current content
<! -More->: truncate the current content so that all content is not displayed on the homepage/directory page.
<? Php timer_stop (1);?> : Webpage loading time (seconds)
<? Php echo get_num_queries ();?> : Number of web page loading queries
The legendary main cycle:
<? Php if (have_posts ():?>
<? Php while (have_posts (): the_post ();?>
<? Php endwhile;?>
<? Php else:?>
<? Php endif;?>
Basic condition judgment:
Is_home (): whether it is the home page
Is_single (): whether it is a content page (Post)
Is_page (): whether it is a Page)
Is_category (): whether it is a Category page (Category/Archive)
Is_tag (): whether it is a Tag archiving page
Is_date (): whether to specify the date archive page
Is_year (): specifies whether the year is archived.
Is_month (): specifies whether the month is archived.
Is_day (): indicates whether to specify a day archive page.
Is_time (): specifies whether the time Archive page is used.
Is_archive (): whether it is an archive page
Is_search (): whether it is a search result page
Is_404 (): whether the error page is "404: Not Found"
Is_paged (): whether the Home/Category/Archive page is displayed in multiple pages