• 16-09-2007, 10:45:52
    #1
    Üyeliği durduruldu
    mrb. arkadaslar sayfa sayac eklentisi ekledim netdelisi.net e ama bir turlu ana sayfada gösteremedim Bknz: Kategori menüsü gibi Bir menü acmak istiyorum admin panelinden tema editörü/yan menü den yapmaya calisiyorum ama olmuyor simdi ben en cok okunanlar diye bir menü olusturmak istiyorum ama yapamiyorum nasil

    En cok okunanlar Kodu

          <?php ToplamdaEnCokOkunanlar(10, ' (', ')', '<ul>', '<li>', '</li>', '</ul>'); ?>
  • 16-09-2007, 15:39:56
    #2
    Üyeliği durduruldu
    Kimse bilmiyormu
  • 16-09-2007, 15:41:26
    #3
    demo siteyi göster bide sidebar.php kodlarını buraya koyarsan belki yardımcı olabilirim
  • 16-09-2007, 16:15:18
    #4
    Üyeliği durduruldu
    Mrb. kardesim Netdelisi.net icin olacak Birde kardesim demo: www.dmry.net'te sag kösede En cok okunanlar var onun gibi ama benim sitenin tasarimina uygun olack (:

    sidebar.php kodu

    <div id="sidebar">
    <ul>
    
      <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
    
        <?php /* Menu for subpages of current page (copied from K2 theme) */
        global $notfound;
        if (is_page() and ($notfound != '1')) {
            $current_page = $post->ID;
            while($current_page) {
                $page_query = $wpdb->get_row("SELECT ID, post_title, post_status, post_parent FROM $wpdb->posts WHERE ID = '$current_page'");
                $current_page = $page_query->post_parent;
            }
            $parent_id = $page_query->ID;
            $parent_title = $page_query->post_title;
    
            // if ($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_status != 'attachment'")) {
            if ($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_type != 'attachment'")) {
        ?>
    
        <li>
          <h2 class="sidebartitle"><?php echo $parent_title; ?></h2>
          <ul class="list-page">
            <?php wp_list_pages('sort_column=menu_order&title_li=&child_of='. $parent_id); ?>
          </ul>
        </li>
    
        <?php } } ?>
    
        <li>
          <h2 class="sidebartitle"><?php _e('Categories'); ?></h2>
          <ul class="list-cat">
            <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?>
          </ul>
        </li>
    
    <?php random_posts(); ?>
    
        <li>
          <h2 class="sidebartitle"><?php _e('Archives'); ?></h2>
          <ul class="list-archives">
            <?php wp_get_archives('type=monthly'); ?>
          </ul>
        </li>
        <li>
    
    
    
          <h2 class="sidebartitle"><?php _e('Links'); ?></h2>
          <ul class="linkcat">
            <?php get_links('-1', '<li>', '</li>', '<br />', FALSE, 'id', FALSE, FALSE, -1, FALSE); ?>
          </ul>
        </li>
    
        
      <?php endif; ?>
    
     </ul>
    </div>
    <!--/sidebar -->
  • 16-09-2007, 16:46:01
    #5
    <div id="sidebar">
    <ul>
      <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
        <?php 
        global $notfound;
        if (is_page() and ($notfound != '1')) {
            $current_page = $post->ID;
            while($current_page) {
                $page_query = $wpdb->get_row("SELECT ID, post_title, post_status, post_parent FROM $wpdb->posts WHERE ID = '$current_page'");
                $current_page = $page_query->post_parent;
            }
            $parent_id = $page_query->ID;
            $parent_title = $page_query->post_title;
            // if ($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_status != 'attachment'")) {
            if ($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_type != 'attachment'")) {
        ?>
        <li>
          <h2 class="sidebartitle"><?php echo $parent_title; ?></h2>
          <ul class="list-page">
            <?php wp_list_pages('sort_column=menu_order&title_li=&child_of='. $parent_id); ?>
          </ul>
        </li>
        <?php } } ?>
        <li>
          <h2 class="sidebartitle"><?php _e('Categories'); ?></h2>
          <ul class="list-cat">
            <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?>
          </ul>
        </li>
    <?php random_posts(); ?>
        <li>
          <h2 class="sidebartitle"><?php _e('Archives'); ?></h2>
          <ul class="list-archives">
            <?php wp_get_archives('type=monthly'); ?>
          </ul>
        </li>
        <li>
          <h2 class="sidebartitle"><?php _e('En çok Okunanlar'); ?></h2>
         
             <?php ToplamdaEnCokOkunanlar(10, ' (', ')', '<ul>', '<li>', '</li>', '</ul>'); ?>
          </ul>
        </li>
        <li>
          <h2 class="sidebartitle"><?php _e('Links'); ?></h2>
          <ul class="linkcat">
            <?php get_links('-1', '<li>', '</li>', '<br />', FALSE, 'id', FALSE, FALSE, -1, FALSE); ?>
          </ul>
        </li>
      <?php endif; ?>
     </ul>
    </div>
    <!--/sidebar -->
    bunula değiştir. fakat senin verdiğin sidebar şu an sitedeki sidebarla uyuşmuyor
  • 16-09-2007, 17:39:50
    #6
    Üyeliği durduruldu
    Yok kardesim benim sitede temanin sidebar.php sinden aldim bu kodlari yani ayni ama ekledim en cok okunanlar kismi cikmadi ?