• 07-04-2017, 14:40:34
    #1
    <?php wp_link_pages('before=<p>&after=</p>&pagelink=%.Yedek'); ?>
    yukardaki kodu ekledikten sonra yazıya <iframe width="640" height="360" src="http://www.cloudy.ec/embed.php?id=11350e13012db" frameborder="0" allowfullscreen></iframe><!--nextpage--><iframe src='http://videoapi.my.mail.ru/videos/embed/mail/aaai.tv/bamboo-blade/4502.html' width='626' height='367' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>

    şeklinde yazıyorum ve yedek 1 yedek 2 şeklinde ekliyor fakat ben başlıkla eklemek istiyorum mesela vk , openload vs vs nasıl yapabilirim?
  • 19-04-2017, 08:56:46
    #2
    GÜncell
  • 19-04-2017, 10:19:27
    #3
    Mesajım bulunsun, pc'ye geçince eğer kodlar duruyorsa paylaşırım.

    --R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 09:19:27 -->-> Daha önceki mesaj 08:23:42 --

    satrancali adlı üyeden alıntı: mesajı görüntüle
    GÜncell
    İlk olarak temanızın functions.php dosyasına aşağıdaki kodları ekleyin.

    function wp_link_pages_baslikli($args = '') {
        $defaults = array(
            'before' => '<p>', 
            'after' => '</p>',
            'link_before' => '', 
            'link_after' => '',
            '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, '<!--partbaslik:' );
                if( 0 === $has_part_title ) {
                    $end = strpos( $part_content, '-->' );
                    $title = trim( str_replace( '<!--partbaslik:', '', substr( $part_content, 0, $end ) ) );
                }            
                $output .= ' ';
                if ( ($i != $page) || ((!$more) && ($page==1)) ) {
                    $output .= _wp_link_page($i);
                }            
                
                $title = isset( $title ) && ( strlen( $title ) > 0 ) ? $title : 'Genel';
                $output .= $link_before . $title . $link_after;
                if ( ($i != $page) || ((!$more) && ($page==1)) )
                    $output .= '</a>';
            }
            $output .= $after;
        }
        if ( $echo )
            echo $output;
        return $output;
    }
    Single.php'de bulunan kodu wp_link_pages kısmını aşağıdaki ile değiştirin.

    <?php wp_link_pages_baslikli(); ?>
    Daha sonra da yazı içerisinde partlara ayırmak istediğiniz yerde bu şekilde kullanacaksınız.

    İÇERİK VS. VS.
    <!--nextpage--><!--partbaslik: VK -->
    VK içerik
    <!--nextpage--><!--partbaslik: Odnok -->
    Odnok içerik
    <!--nextpage--><!--partbaslik: Openload -->
    openload içerik