Wordpress Part sistemini başlığa göre sıralama
$10-30 USD
Arkadaşlar aşağıdaki fonksiyonu kullanarak part sistemini kullanıyorum.
function film_partlar($args = '') {
$defaults = array(
'link_before' => '<span class="rad3">',
'link_after' => '</span>',
'echo' => 1
);
$r = wp_parse_args( $args, $defaults );
extract( $r, EXTR_SKIP );
global $page, $numpages, $multipage, $more, $pagenow, $pages;
$output = '';
if ( $multipage ) {
$output .= $before;
for ( $i = 1; $i < ($numpages+1); $i = $i + 1 ) {
$part_content = $pages[$i-1];
$has_part_title = strpos( $part_content, '<!--baslik:' );
if( 0 === $has_part_title ) {
$end = strpos( $part_content, '-->' );
$title = trim( str_replace( '<!--baslik:', '', substr( $part_content, 0, $end ) ) );
}
$output .= ' ';
if ( ($i != $page) || ((!$more) && ($page == 1)) ) {
$output .= _wp_link_page($i);
}
$title = isset( $title ) && ( strlen( $title ) > 0 ) ? $title : 'Part 1';
$output .= $link_before . $title . $link_after;
if ( ($i != $page) || ((!$more) && ($page==1)) )
$output .= '</a>';
}
$output .= $after;
}
if ( $echo )
echo $output;
return $output;
}
Benim sorunun benim vereceğim başlık isimlerine göre sıralama yapması ve bazı başlıkları hiç göstermemesi.
项目 ID: 18180989
关于此项目
远程项目
活跃5 年前
想赚点钱吗?
在Freelancer上竞价的好处