• 14-05-2009, 16:24:25
    #19
    tamamdır, anladım. teşekkurler...
  • 16-05-2009, 16:28:18
    #20
    bu sistemle yaptığım bir site Breaking News | Latest News | Current News bu kod gerçekten çok işime yaradı
  • 16-05-2009, 16:47:33
    #21
    ben birşey daha sorcam, postta image yoksa nasıl yapcaz? olasılıklar +ilgili kategorideki posttan image çekme +kategori resimleri düzenleyip belirlenmiş bir resim çekme +google image den konu ile ilgili ilk resmi çekme... bunlardan hangileri mümkün? saygılar...
  • 19-05-2009, 09:53:12
    #22
    arkadaşlar konuya katılan yokmu yaw
  • 19-05-2009, 10:45:23
    #23
    Platin üye
    resim yoksa önceden belirlediğiniz bir resmi basarsınız.

    Forumdan bir yerden kopyaladığım kod şu şekilde;
    Alıntı
    <?php $id =$post->ID;
    $the_content =$wpdb->get_var("SELECT post_content FROM $wpdb->posts WHERE ID = $id");
    $pattern = '!<img.*?src="(.*?)"!';
    preg_match_all($pattern, $the_content, $matches);
    $image_src = $matches['1'][0]; ?>

    bu kodla konunun içindeki ilk resmi çekebilirsin...

    yazdırma içinde
    Alıntı:

    <?php
    if($image_src != "") { ?>
    <a href="<?php the_permalink() ?>"><img src="<? echo strtolower($image_src); ?> alt="<?php the_title(); ?>" class="left" width="200px" height="200px" /></a>
    <?php }else{ ?>
    <a href="<?php the_permalink() ?>"><img src="http://www.siteniz.com/defaultresim.jpg"></a>
    <?php } ?>
  • 05-09-2010, 22:04:23
    #24
    Üyeliği durduruldu
    seLamlar. Zigmag Future Temasında nasıl yapabiliriz arkadaşlar??

    Kodları aşağıda..



    <?php get_header(); ?>
    <center><script type="text/javascript"><!--
    google_ad_client = "pub-5554204140586400";
    /* 728x15, oluÅŸturulma 12.05.2009 */
    google_ad_slot = "1201932937";
    google_ad_width = 728;
    google_ad_height = 15;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script></center>
    <?php include (TEMPLATEPATH . "/slide.php"); ?>
    <div id="content"><a name="content"></a>


    <?php include (TEMPLATEPATH . '/featured.php'); ?>
    <?php include (TEMPLATEPATH . '/glide.php'); ?>


    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>


    <div class="post" id="post-<?php the_ID(); ?>">


    <div class="centry">
    <?php $homethumb = get_post_meta($post->ID,'homethumb', true); ?>
    <img src="<?php bloginfo('url'); ?>/wp-content/uploads/<? echo strtolower($homethumb); ?>.jpg" width="100" height="60" >

    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <div class="categ"><?php the_category(', '); ?> </div>

    <?php the_excerpt(); ?>

    </div>

    <div class="postinfo">
    <div class="comm"><?php comments_popup_link('Yorum Ekle', '1 Yorum', '% Yorumlar'); ?></div>
    <div class="postmore"> <a href="<?php the_permalink() ?>">Daha Fazla Oku</div>
    </div>

    </div>


    <?php endwhile; ?>


    <div class="footer"><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?></div>



    <?php else : ?>

    <h1>Not Found</h1>


    <div class="cover">
    <div class="entry">
    <p>Sorry, no post matched your criteria. Try a different search?</p>

    </div>

    </div>

    <?php endif; ?>

    </div>


    <?php get_sidebar(); ?>
    <?php get_footer(); ?>