<!–p get_header();–>: 调用Header模板
<!–p get_sidebar();–>: 调用Sidebar模板
<!–p get_footer();–>: 调用Footer模板
<!–p the_content();–>: 显示内容(Post/Page)
<!–p if(have_posts()) :–>: 检查是否存在Post/Page
<!–p while(have_posts()) : the_post();–>: 如果存在Post/Page则予以显示
<!–p endwhile;–>: While 结束
<!–p endif;–>: If 结束
<!–p the_time(’字符串’)–>: 显示时间,时间格式由“字符串”参数决定,具体参考PHP手册
<!–p comments_popup_link();–>: 正文中的留言链接。如果使用 comments_popup_script() ,则留言会在新窗口中打开,反之,则在当前窗口打开
<!–p the_title();–>: 内容页(Post/Page)标题
<!–p the_permalink()–>: 内容页(Post/Page) Url
<!–p the_category(’,’)–>: 特定内容页(Post/Page)所属Category
<!–p the_author();–>: 作者
<!–p the_ID();–>: 特定内容页(Post/Page) ID
<!–p edit_post_link();–>: 如果用户已登录并具有权限,显示编辑链接
<!–p get_links_list();–>: 显示Blogroll中的链接
<!–p comments_template();–>: 调用留言/回复模板
<!–p wp_list_pages();–>: 显示Page列表
<!–p wp_list_categories();–>: 显示Categories列表
<!–p next_post_link(’%link’);–>: 下一篇文章链接
<!–p previous_post_link(’%link’);–>: 上一篇文章链接
<!–p get_calendar();–>: 日历
<!–p wp_get_archives()–>: 显示内容存档
<!–p posts_nav_link();–>: 导航,显示上一篇/下一篇文章链接
<!–p include(TEMPLATEPATH . ‘/文件名’);–>: 嵌入其他文件,可为定制的模板或其他类型文件
模板相关其他函数
<!–p _e(’Message’);–>: 输出相应信息
<!–p wp_register();–>: 显示注册链接
<!–p wp_loginout();–>: 显示登录/注销链接
<!–ext pag–>: 将当前内容分页
<!–or–>: 将当前内容截断,以不在主页/目录页显示全部内容
<!–p timer_stop(1);–>: 网页加载时间(秒)
<!–p echo get_num_queries();–>: 网页加载查询量
当然,wordpress的函数远远不止这些,如果你有更高的要求,请访问wordpress官方代码页面
标签:WordPress
相关阅读 >>
upupw 更新 64 位 apache 系列 php 7.0 正式版
wordpress中让widget 标题支持简单的html标签
更多相关阅读请进入《wordpress》频道 >>