<?php
$post_ID = get_the_ID();
$not_in = array( $post_ID );
$dizi_ID = get_meta('ilgilidizi');
$dizi_adi = get_meta('diziadi');
$dizi_sezon = get_meta('sezon');
if( $dizi_ID || $dizi_adi ) {
if( $dizi_ID ) {
$b_key = 'ilgilidizi';
$b_val = $dizi_ID;
}
elseif( $dizi_adi ) {
$b_key = 'diziadi';
$b_val = $dizi_adi;
}
$ilgilibolumler = array(
'key' => $b_key,
'value' => $b_val,
);
if( $dizi_sezon ) {
$ilgilisezon = array(
'key' => 'sezon',
'value' => $dizi_sezon,
);
}
$meta_query = array($ilgilibolumler, $ilgilisezon);
$args = array (
'post_type' => list_post_type(),
'posts_per_page' => -1,
'meta_query' => $meta_query,
'orderby'=> 'date',
'order' => 'ASC'
);
$the_query = new WP_Query( $args );
// The Loop
if ( $the_query->have_posts() ) {
echo '<div class="sidebar-content"><div id="similar-movies" class="list-episodes clearfix">';
echo '<div class="top">';
echo _k_('diger bolumler');
if( $dizi_sezon )
echo '<span>'. sprintf(_k_('%s. Sezon'), $dizi_sezon) .'</span>';
echo '</div>';
echo '<ul class="flexcroll">';
$current_post = $post_ID;
while ( $the_query->have_posts() ) {
$the_query->the_post();
// Bölüm Bilgisi
$bilgi = get_meta('bilgi');
// Bölüm Başlığı
$get_title = explode('<br>', get_series_title());
// bölüm adını bul
$title = $get_title[1] . ($bilgi ? ' - ' . $bilgi : '' );
// Bölüm adı
$bolumadi = get_meta('bolumadi');
// Bölüm adı yoksa dizi adını kullan
$bolumadi = !$bolumadi ? $get_title[0] : $bolumadi;
$current = 'episode';
if ( $current_post == $post->ID) {
$current .= ' current grayscale';
}
echo '
<li class="'.$current.'">
<a href="'.get_the_permalink().'" title="'.get_the_title().'">
<div class="info-left">
<div class="poster" style="background-image: url('.get_series_image(array('post_ID' => $dizi_ID, 'type' => 'image', 'size' => 'izlenen-resim')).')"></div>
</div>
<div class="info-right">
<div class="title">'.$title.'</div>
<div class="release">'.$bolumadi.'</div>
</div>
</a>
</li>
';
}
echo '</ul></div></div>';
wp_reset_postdata();
}
}
?> Destek lazım cok uğraştım bulamadım :/
4
●89
- 23-12-2020, 14:24:21Merhaba arkadaşlar bircok klonu açtım fakat kimse yardım etmedi uzun arastirmalar sonunda nasil yapabilecegimi buldum. Bu kod ile bütün bölümleri listeleyebiliyorum fakat benim istedigim bulundugum bolumden bir onceki ve bir sonraki bolumun linkini almak bunu nasil yapabilirim ?
- 23-12-2020, 14:34:10@serdargirgin; sanırım siz full stack developerdinizserdargirgin bunu beğendi.1 kişi bunu beğendi.
- 23-12-2020, 17:46:15Aşırı sıkışık bir zamanda denk geldi ama yardım etmeye çalışıcam. inş çözeriz merak etme.
- 23-12-2020, 19:52:37https://developer.wordpress.org/refe...ext_post_link/ yardımcı olur gibi duruyor