本文整理汇总了PHP中PoTable::findRelatedPost方法的典型用法代码示例。如果您正苦于以下问题:PHP PoTable::findRelatedPost方法的具体用法?PHP PoTable::findRelatedPost怎么用?PHP PoTable::findRelatedPost使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PoTable
的用法示例。
在下文中一共展示了PoTable::findRelatedPost方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PoTable
<div class="row page_margin_top">
<ul class="taxonomies tags left clearfix">
<?php
$tabletag = new PoTable('tag');
$tags = $tabletag->findAll(id_tag, DESC);
$arrtags = explode(',', $currentDetail->tag);
foreach ($tags as $tag) {
$cek = array_search($tag->tag_seo, $arrtags) != false ? '' : 'display:none;';
echo "<li style='{$cek}'><a href='{$website_url}/search-result/{$tag->tag_title}' title='{$tag->tag_title}'>{$tag->tag_title}</a></li>";
}
?>
</ul>
</div>
<?php
$tablerelated = new PoTable('post');
$tablerelateds = $tablerelated->findRelatedPost($currentDetail->tag, $idpost, id_post, "DESC", "5");
if (count($tablerelateds) > 1) {
?>
<div class="row page_margin_top_section">
<h4 class="box_header">Post Terkait</h4>
<div class="horizontal_carousel_container page_margin_top">
<ul class="blog horizontal_carousel autoplay-1 scroll-1 navigation-1 easing-easeInOutQuint duration-750">
<?php
foreach ($tablerelateds as $tablerelated) {
?>
<li class="post">
<a href="<?php
echo "{$website_url}/detailpost/{$tablerelated->seotitle}";
?>
" title="<?php
echo $tablerelated->title;