<?php include_once(FilterPath()."/wp-content/themes/shopperpress/_gallerypage.php"); ?>arkadaş anasayfada ürünleri gösterdigim kod bu...Bu kodla ilk ekledigim ürünler hep başta kalıyor yeniler sonda kalıyor..Ben rast gele bir ürün çıkmasını istiyorum yardımlarınız için şimdiden teşekürler.
Şu kodu düzelte bilecek varmı
9
●600
- 07-01-2011, 23:12:29
- 07-01-2011, 23:27:45iyide bu kod sadece galery sayfasını ana sayfada göstermek için asıl olay gallery sayfasında gibi geliyor banastop18 adlı üyeden alıntı: mesajı görüntüle
yani gellery sayfasını çoğalt örneğin gallerypage2.php onun üzerinde oynama yap ne yapmk istiyorsan
- 07-01-2011, 23:54:51Ne yaptıysam düzeltemedim tüm kodları denedim bir türlü olmadı şu kodlara bakar mısınız..ayarlıya bilecek olan varmı ??
<?php /* * info: Featured Items */ $category = shopperpress_getcat($_REQUEST); if(get_option("display_view") =="yes"){ ?> <div class="ListViewNav"> <a href="<?php echo selfURL1(); ?>/index.php?cat=<?php echo $category->cat_ID; ?>&type=0" style="text-decoration:none;" title="Gallery View" <?php if(get_option("analytics_tracking") =="yes"){ ?>onclick="pageTracker._trackEvent('HOME PAGE', 'Page View', 'Gallery View');"<?php } ?>><?php echo $GLOBALS['_LANG']['_galleryview'] ?></a> <a href="<?php echo selfURL1(); ?>/index.php?cat=<?php echo $category->cat_ID; ?>&type=1" style="text-decoration:none;" title="List View" <?php if(get_option("analytics_tracking") =="yes"){ ?>onclick="pageTracker._trackEvent('HOME PAGE', 'Page View', 'List View');"<?php } ?>><?php echo $GLOBALS['_LANG']['_listview'] ?></a> </div> <?php } ?> <h2 class="h2top"><?php echo $GLOBALS['_LANG']['_featuredproducts'] ?></h2> <?php if($category->description !=""){ echo "<p>".$category->description."</p>"; } ?> <?php include("_navigation.php"); ?> <?php if( !isset($_GET['sort']) && ( get_option("analytics_code") =="gallery" || !isset($_GET['type'])) ){ ?> <?php if($GLOBALS['adminads'] ==1){ include("_ad_search_top.php"); } ?> <div id="FeaturedProducts"> <ul class="ProductList<?php echo $GLOBALS['SP_LAY_CONTENT_LIST'] ?>"> <?php $order=trim(get_option("display_defaultorder")); $posts = query_posts($query_string . '&orderby='.$order.'&order='.$order.'&exclude='.get_option("article_cats")); $cc=1; $adStop=1; while (have_posts()) : the_post(); $DisplaayImage = get_post_meta($post->ID, "thumbnail", true); if($DisplaayImage ==""){ $DisplaayImage = get_post_meta($post->ID, "image", true); } $oldPrice = get_post_meta($post->ID, "old_price", true); // ADMIN ADD SETUP OPTIONS if($GLOBALS['adminads'] ==1){ if($cc==5 && $adStop < 2){ print "<div style='clear:both; height:100px;'>"; include("_ad_middle.php"); print "</div>"; $cc=0; $adStop++; }else{ if(file_exists(FilterPath()."/wp-content/themes/shopperpress/themes/".$GLOBALS['shopperpress']['theme'].'/_item.php')){ include(FilterPath()."/wp-content/themes/shopperpress/themes/".$GLOBALS['shopperpress']['theme'].'/_item.php'); }else{ include("_item.php"); } } }else{ if(file_exists(FilterPath()."/wp-content/themes/shopperpress/themes/".$GLOBALS['shopperpress']['theme'].'/_item.php')){ include(FilterPath()."/wp-content/themes/shopperpress/themes/".$GLOBALS['shopperpress']['theme'].'/_item.php'); }else{ include("_item.php"); } } $cc++; endwhile; ?> </ul> <br class="Clear" /> </div><!--FeaturedProducts--> <?php }else{ ?> <br> <div class="listing"> <div class="head"> <span class="name"> <?php _e('Item Name','cp'); ?> <a href="./?sort=title&order=asc"><img src="<?php bloginfo('template_url'); ?>/images/sortup.gif" border="0" alt="sort up" /></a><a href="./?sort=title&order=desc"><img src="<?php bloginfo('template_url'); ?>/images/sortdown.gif" border="0" /></a> </span> <span class="price"> <?php if($GLOBALS['shopperpress']['price_tag'] =="yes"){ ?><?php _e('Price','cp'); ?> <a href="./?sort=meta_value&key=price&order=asc"><img src="<?php bloginfo('template_url'); ?>/images/sortup.gif" border="0" alt="sort down"/></a><a href="./?sort=meta_value&key=price&order=desc"><img src="<?php bloginfo('template_url'); ?>/images/sortdown.gif" border="0" /></a> <?php } ?> </span> <span class="date"></span> <div class="clear"></div> </div> <div class="list"> <?php $i = 1; $order=trim(get_option("display_defaultorder")); if(!empty($_GET['sort'])) { $orderby=trim($_GET['sort']); } $posts = query_posts($query_string . '&orderby='.$order.'&order='.$order.'&exclude='.get_option("article_cats")); if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php if ($i % 2 == 0) { $alt = " class=\"alt\""; } else { $alt = " class=\"no\""; } echo "<div" . $alt; if (is_sticky()) { echo " id='sticky' "; } echo ">"; $oldPrice = get_post_meta($post->ID, "old_price", true); ?> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" <?php if(get_option("analytics_tracking") =="yes"){ ?>onclick="pageTracker._trackEvent('HOME PAGE', 'List View Items', '<?php the_title(); ?>');"<?php } ?>> <?php if ( get_option('main_page_img') != "no" ) { ?> <span class="image"> <?php $images = get_post_meta($post->ID, "image", true); if ($images =="") {?> <div class="main_page_no_img"><img src="<?php bloginfo('template_url'); ?>/images/no-pic.png" alt="No Photo" border="0" style="width:65px; height:65px; border:1px solid black;" /></div></span> <?php } else { ?> <div class="main_page_img" style="background: #FFF url(<?php echo SPImage($images,"m"); ?>) center no-repeat"></div></span> <?php } } ?> <span class="item" style="line-height:20px;"><div style="text-decoration:underline; font-weight:bold;"><?php if ( strlen(get_the_title()) > 45 ) { echo substr(get_the_title(), 0, 45)."..."; } else { the_title(); } ?></div> <?php echo substr(strip_tags($post->post_excerpt), 0, 95)."...";?></span> <span class="price"> <?php if($GLOBALS['shopperpress']['price_tag'] =="yes"){ ?> <?php echo $_SESSION['currency_symbol']; ?> <?php echo GetPrice(get_post_meta($post->ID, "price", true)); ?> <br> <?php if(strlen($oldPrice) > 1){ ?><strike><?php echo $_SESSION['currency_symbol']; ?> <?php echo get_post_meta($post->ID, "old_price", true); ?></strike><?php } ?> <?php } ?> </span> <span class="date"> <?php if(get_option("display_cart") =="yes"){ ?><div class="ProductAdd"><a href="#" onclick="<?php echo getBuyLink($post); ?> <?php if(get_option("analytics_tracking") =="yes"){ ?>pageTracker._trackEvent('HOME PAGE', 'Add Cart', '<?php the_title(); ?>');<?php } ?>" title="<?php echo $GLOBALS['_LANG']['_add'] ?>" style="color:white"><?php echo $GLOBALS['_LANG']['_add'] ?></a></div><?php } ?> </span> <div class="clear"></div> </div> </a> <?php $i++; unset($alt); ?> <?php endwhile; ?> <?php endif; ?> </div> </div> <?php } ?> <?php include("_navigation.php"); ?> <div style="clear:both;"></div> - 08-01-2011, 00:33:34hocam admin panelindeki ayarlara bir göz atın... yanılmıyorsam burada sırala burada sıralama için sorgu var yani sizin yönetim panelinden seçtiğiniz sıralamaya göre ana sayfadaki ürünleri sıralıyor ama önemli olan sıralama için hangi sorguyu kullanıyor
bu arda sırlamanın olduğu satırlar
orderby ile başlayanlar olsa gerek fakat şunun altını çizmekte fayda var ben bu konuda pek iyi değilim
yinede elimden geldiğince yardımcı olurum
include ettiklerine ufak bir ön izleme yaparsak şayet
_navigation.php adında anlaşılacağı gibi itemler arası gezmeni sağlıyor yada 1 2 3 4 sayfa da olabilir
_ad_search_top.php üst kısımdaki aramanın oradaki reklam
_ad_middle.php orta kısımdaki reklam
_item.php ürünlerin
son olarak da her şeyin yönetim panelinde bittiğini söylemek istiyorum
kolay gelsin hocam - 08-01-2011, 02:03:33tdept adlı üyeden alıntı: mesajı görüntüle
evet admin panelden temayla ilgili herşeyi kontrol edebiliyoruz fakat...zaten anasayfada ürün gösteremiyordum.........sorunluydu..fakat galeriyi anasayfaya çekerek sorunu çözdük..onunda rastgele çıkmasını istiyorum ama olmadı bir türlü.. - 08-01-2011, 22:05:11çok teşekürler vallaha süpersin......dedigin bu yerigfxcm adlı üyeden alıntı: mesajı görüntüle
display_defaultorder
Bununla degiştirdimptthemes_breadcrumbs
son yazılar çıktı başa...rast gele kodunu biliyorsan paylaşırsan sevinirim - 09-01-2011, 14:38:34valla tam emin değilim ama şunu dene mantık olarak default varsayılan random rastgele ama atıyorda olabilirimstop18 adlı üyeden alıntı: mesajı görüntüle

display_randomorder
yani gellery sayfasını çoğalt örneğin gallerypage2.php onun üzerinde oynama yap ne yapmk istiyorsan