• 23-06-2013, 21:24:58
    #1
    Ürün kategori sayfası için bir tema oluşturdum. Sayfada, sayfanın alt sayfaları listeleniyor ama hiç bir yerden bir ayar yapmamama rağmen sayfada sadece 5 adet ürün görünüyor.

    Şimdiden teşekkürler.
  • 23-06-2013, 23:13:51
    #2
    wp-admin / Ayarlar / Okuma toplam gözükecek yazı sayısı alanında ki 5 değerini değiştirip istediğiniz değeri girebilirsiniz.
  • 04-07-2013, 12:46:02
    #3
    Orada zaten şuanda 10 yazıyor.
  • 09-07-2013, 15:32:48
    #4
    Halen çözüm arıyorum. Yardımcı olabilecek varmı?
  • 09-07-2013, 16:34:07
    #5
    Muhtemelen temadaki bir kod içerisinde yazı sayısı 5 olarak belirtilmiştir. Temanın functions.php dosyasına ya da page.php dosyasında böyle bir kodun varlığını araştırın.
  • 03-08-2013, 04:43:19
    #6
    Functions.php de 5 diye arattım, 5 yok bile dosya içerisinde. Custom page olduğu için sayfaya ait dosyaya baktım orada da herhangi bir sınırlandırma yok.
  • 03-08-2013, 13:57:07
    #7
    BebboBRR adlı üyeden alıntı: mesajı görüntüle
    Functions.php de 5 diye arattım, 5 yok bile dosya içerisinde. Custom page olduğu için sayfaya ait dosyaya baktım orada da herhangi bir sınırlandırma yok.
    Özel template dosyanızın kodlarını bir ekleyin, bakalım.
  • 03-08-2013, 14:03:49
    #8
    <?php /*
    Template Name: Product Categories
    */
    ?>
    <?php get_header(); ?>
            <div class="clearLeft">
            </div>
            <div id="fullcontent">
            	<div class="fullcontenthead">
                	<h1><?php the_title(); ?></h1>
                </div>
            	<div id="contentproductleft">
            		<ul class="productmenu">
                    	<?php wp_list_pages('include=7,40,42,44,46,48,50,51,53&title_li='); ?>
                    </ul>
            	</div>
            	<div id="contentproductlist">
            	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                        <?php
                        $children = get_posts(array('post_type' => 'page', 'post_parent' => $post->ID ));
                        if ($children) {
                            foreach ( $children as $child ){
                                $values = get_post_custom_values("Product_Image", $child->ID);
                                $values1 = get_post_custom_values("Product_Price", $child->ID);
                                $link = get_permalink($child->ID);
                                $page_data = get_page($child->ID);
                                ?>
                                <div class="productbox">
                                    <div class="productboxhead">
                                    	<a href="<?=$link?>">
    										<?=$child->post_title?>
                                        </a>
                                    </div>
                                	<div class="productboxleft">
    									<div class="productboxprice">
    										<? echo $values1[0]; ?> DHS
                                        </div>
                                        <div onClick="location.href='<?=$link?>'" style="cursor:pointer" class="productboxbt">
    										DETAILS
    									</div>
                                    </div>
                                	<div class="productboxright">
                                        <a href="<?=$link?>">
                                            <img src="<? echo $values[0]; ?>" alt="" width="59" height="113" class="alignleft" />
                                        </a>
                                   </div>
                                </div>
                                <?
                            }
                        }
                    ?>
    	<?php endwhile; else: ?>
    		<div class="alert-box error">Desolé, la page demandé n'est pas trouvé...</div>
    	<?php endif; ?>
    			</div>
                <!-- .contentproductlist -->
    		</div><!-- #fullcontent -->      
            <div class="clearLeft">
            </div>
    <?php get_footer(); ?>
    yakuphan adlı üyeden alıntı: mesajı görüntüle
    Özel template dosyanızın kodlarını bir ekleyin, bakalım.
  • 03-08-2013, 14:12:00
    #9
    $children = get_posts(array('post_type' => 'page', 'post_parent' => $post->ID ));
    kodunu
    $children = get_posts(array('post_type' => 'page', 'post_parent' => $post->ID, 'posts_per_page' => -1 ));
    Koddaki get_posts fonksiyonunun varsayılan yazı sayısı 5'tir, posts_per_page=-1 bunu sınırsız yapar. -1 yerine 10 yazarsanız ilk 10 tanesini alır.
    Fonksiyon için ayrıntılı bilgi
    http://codex.wordpress.org/Template_Tags/get_posts