douzao9845 2014-01-21 02:25 采纳率: 0%
浏览 93
已采纳

Wordpress loop.php功能

I'm new to wordpress, but I've done PHP for a little while.

Is the loop.php EXCLUSIVELY just for displaying blog posts...or does it have other useful functionality for pages as well?

I'm using a theme, and most of the pages have ...

<?php get_template_part('loop'); ?>

... in them. This is not a blog site and I don't need blog posts displayed. I do want other web content where this is displaying on the page.

Is it proper WP coding style to use the loop for content, even if its not a blog site? Or can I just remove the line and replace it with page code?

Thanks!

  • 写回答

1条回答 默认 最新

  • dpitqpax07626 2014-01-21 02:52
    关注

    The page code isn't what that code replaces... More on get_template_part http://codex.wordpress.org/Function_Reference/get_template_part

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部