• 15-11-2016, 14:04:57
    #1
    Arkadaşlar web sitesi alanında yeni olduğum için metin alanına <!--Nextpage> kodunu kullanarak part ekleyebiliyorum ama bölüm 1 bölüm 2 v.s şeklinde nasıl adlandırma yapabilirim yardımcı olabilirimisiniz.
  • 15-11-2016, 14:18:59
    #2
    Functions.php'ye bunu ekleyin.

    function wp_link_pages_titled($args = '') {
        $defaults = array(
            'before' => '<p>' . __('Sayfalar:'), 
            '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, '<!--sayfabaslik:' );
                if( 0 === $has_part_title ) {
                    $end = strpos( $part_content, '-->' );
                    $title = trim( str_replace( '<!--sayfabaslik:', '', substr( $part_content, 0, $end ) ) );
                }
                $output .= ' ';
                if ( ($i != $page) || ((!$more) && ($page==1)) ) {
                    $output .= _wp_link_page($i);
                }
                $title = isset( $title ) && ( strlen( $title ) > 0 ) ? $title : 'İlk';
                $output .= $link_before . $title . $link_after;
                if ( ($i != $page) || ((!$more) && ($page==1)) )
                    $output .= '</a>';
            }
            $output .= $after;
        }
        if ( $echo )
            echo $output;
        return $output;
    }
    Bunu da yazı içerisinde ayırmak istediğiniz yerde kullanacaksınız.

    <!--nextpage--><!--sayfabaslik: Sayfa Başlığı 1 -->
  • 16-11-2016, 20:26:01
    #3
    FSahin adlı üyeden alıntı: mesajı görüntüle
    Functions.php'ye bunu ekleyin.

    function wp_link_pages_titled($args = '') {
        $defaults = array(
            'before' => '<p>' . __('Sayfalar:'), 
            '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, '<!--sayfabaslik:' );
                if( 0 === $has_part_title ) {
                    $end = strpos( $part_content, '-->' );
                    $title = trim( str_replace( '<!--sayfabaslik:', '', substr( $part_content, 0, $end ) ) );
                }
                $output .= ' ';
                if ( ($i != $page) || ((!$more) && ($page==1)) ) {
                    $output .= _wp_link_page($i);
                }
                $title = isset( $title ) && ( strlen( $title ) > 0 ) ? $title : 'İlk';
                $output .= $link_before . $title . $link_after;
                if ( ($i != $page) || ((!$more) && ($page==1)) )
                    $output .= '</a>';
            }
            $output .= $after;
        }
        if ( $echo )
            echo $output;
        return $output;
    }
    Bunu da yazı içerisinde ayırmak istediğiniz yerde kullanacaksınız.

    <!--nextpage--><!--sayfabaslik: Sayfa Başlığı 1 -->
    teşekkürler