本文整理汇总了PHP中Posts::getPostsLoop方法的典型用法代码示例。如果您正苦于以下问题:PHP Posts::getPostsLoop方法的具体用法?PHP Posts::getPostsLoop怎么用?PHP Posts::getPostsLoop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Posts
的用法示例。
在下文中一共展示了Posts::getPostsLoop方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: englishConvertDate
echo englishConvertDate($row['post_date']);
?>
</em></span><br>
<?php
}
?>
<br><a href="<?php
echo SITE_DOMAIN . 'news.php';
?>
" class="btn btn-info"><i class="mdi mdi-archive"></i> Archive</a><br><br>
</div>
<div style="text-align: left" class="col-xs-12 col-sm-12 col-md-3 col-lg-3 div_white_left">
<br>
<article>
<?php
while ($row = $posts2->getPostsLoop(1)) {
?>
<a href="<?php
echo $posts->getPostPermLink($row['ID'], $row['post_type'], $row['link_title']);
?>
"><h4 style="font-weight: bold;"><?php
echo strip_tags($row['post_title']);
?>
</h4></a> <span style="color: #808080;"><i style="vertical-align: middle;" class="mdi mdi-calendar"></i> <?php
echo englishConvertDate($row['post_date']);
?>
</span>
<p><?php
echo $row['post_excerpt'];
?>
</p>
示例2: generatePagesSitemap
function generatePagesSitemap()
{
$sitemap = new Sitemap(SITE_DOMAIN);
$sitemap->setPath(DOC_ROOT . '/');
$sitemap->setFilename('page');
$posts = new Posts();
$sitemap->addItem('', '1.0', 'daily', 'Today');
while ($row = $posts->getPostsLoop(null, 'page')) {
$sitemap->addItem($posts->getPostPermLink($row['ID'], $row['post_type'], $row['link_title']), '0.8', 'weekly', $row['post_date']);
}
$sitemap->createSitemapIndex(SITE_DOMAIN, 'Today');
}
示例3: englishConvertDate
<?php
include_once 'sidebar.php';
?>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 col-md-offset-1 col-lg-offset-1 div_white_left">
<br>
<div style="text-align: center" class="search">
<form action="<?php
echo SITE_DOMAIN;
?>
search.php" method="GET">
<input class="form-block" type="search" name="search_query"> <input rel="search" type="submit" name="search_submit" class="btn btn-search" style="margin-bottom: 3px;" value="Search">
</form>
</div>
<?php
while ($row = $posts->getPostsLoop()) {
?>
<article class="post">
<a href="<?php
echo $posts->getPostPermLink($row['ID'], $row['post_type'], $row['link_title']);
?>
"><h3 style="font-weight: bold;"><?php
echo strip_tags($row['post_title']);
?>
</h3></a> <span style="color: #808080;"><i style="vertical-align: middle;" class="mdi mdi-calendar"></i> <?php
echo englishConvertDate($row['post_date']);
?>
<i style="vertical-align: middle;" class="mdi mdi-file"></i> <?php
echo getCategoryById(getPostCategories($row['ID'])[0]);
?>
</span>