本文整理匯總了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;