lostyazilim
tr.link

wordpress pagenavi sorunu

12 Mesajlar 1.248 Okunma
lstbozum
tr.link

coder1481 coder1481 WM Aracı Kullanıcı
  • Üyelik 09.03.2017
  • Yaş/Cinsiyet 37 / E
  • Meslek web master
  • Konum Bolu
  • Ad Soyad R** A**
  • Mesajlar 204
  • Beğeniler 6 / 20
  • Ticaret 0, (%0)
TEHET tema ıcındekı kod su sekıldedır.

/*
Plugin Name: WP-PageNavi
Plugin URI: http://lesterchan.net/portfolio/programming/php/
Description: Adds a more advanced paging navigation to your WordPress blog.
Version: 2.40
Author: Lester 'GaMerZ' Chan
Author URI: http://lesterchan.net
*/

### Function: Page Navigation CSS

### Function: Page Navigation: Boxed Style Paging
function wp_pagenavi($before = '', $after = '') {
global $wpdb, $wp_query;
if (!is_single()) {
$request = $wp_query->request;
$posts_per_page = intval(get_query_var('posts_per_page'));
$paged = intval(get_query_var('paged'));

$pagenavi_options = array();
$pagenavi_options['pages_text'] = __('ALL PAGES');
$pagenavi_options['current_text'] = '%PAGE_NUMBER%';
$pagenavi_options['page_text'] = '%PAGE_NUMBER%';
$pagenavi_options['first_text'] = __('« İlk');
$pagenavi_options['last_text'] = __('Son »');
$pagenavi_options['next_text'] = __('»');
$pagenavi_options['prev_text'] = __('«');
$pagenavi_options['dotright_text'] = __('');
$pagenavi_options['dotleft_text'] = __('');
$pagenavi_options['style'] = 1;
$pagenavi_options['num_pages'] = 5;
$pagenavi_options['always_show'] = 0;

$numposts = $wp_query->found_posts;
$max_page = $wp_query->max_num_pages;

if(empty($paged) || $paged == 0) {
$paged = 1;
}
$pages_to_show = intval($pagenavi_options['num_pages']);
$pages_to_show_minus_1 = $pages_to_show-1;
$half_page_start = floor($pages_to_show_minus_1/2);
$half_page_end = ceil($pages_to_show_minus_1/2);
$start_page = $paged - $half_page_start;
if($start_page <= 0) {
$start_page = 1;
}
$end_page = $paged + $half_page_end;
if(($end_page - $start_page) != $pages_to_show_minus_1) {
$end_page = $start_page + $pages_to_show_minus_1;
}
if($end_page > $max_page) {
$start_page = $max_page - $pages_to_show_minus_1;
$end_page = $max_page;
}
if($start_page <= 0) {
$start_page = 1;
}
if($max_page > 1 || intval($pagenavi_options['always_show']) == 1) {
$pages_text = str_replace("%CURRENT_PAGE%", number_format_i18n($paged), $pagenavi_options['pages_text']);
$pages_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pages_text);
echo $before.''.$after."\n";
}
}
}


### Function: Page Navigation: Drop Down Menu (Deprecated)
function wp_pagenavi_dropdown() {
wp_pagenavi();
}
?>
 

 

mobillike.com
wmaraci
reklam

AshiL AshiL Elektrik Teknikeri Kullanıcı
  • Üyelik 18.02.2013
  • Yaş/Cinsiyet 43 / E
  • Meslek Elektrik Teknikeri
  • Konum Aydın
  • Ad Soyad F** H**
  • Mesajlar 724
  • Beğeniler 56 / 114
  • Ticaret 0, (%0)
warez temaya yardım yapılmaz warez değilse üretici olan firmadan destek alın
 

 

https://cetirdek.com Webmaster Forumu..
Site Ayarları
  • Tema Seçeneği
  • Site Sesleri
  • Bildirimler
  • Özel Mesaj Al