• 09-02-2020, 16:48:41
    #1
    Arakdaşlar internetteki tüm kodlar bozulmuş gibi temada kaymalara sebep oluyor. Tüm yazılarda çok çok eski, acaba eklentisiz olarak şekilde adam akıllı kod yok mu?
  • 09-02-2020, 16:55:02
    #2
    https://ecancan.com/wordpress-kod-bankasi/

    burada mevcuttu, ama tam nasıl yapılır bilmiyorum
  • 09-02-2020, 17:00:32
    #3
    EnesCanturk adlı üyeden alıntı: mesajı görüntüle
    https://ecancan.com/wordpress-kod-bankasi/

    burada mevcuttu, ama tam nasıl yapılır bilmiyorum
    Benimde o kadar bilgim yok hocam.
  • 09-02-2020, 23:07:42
    #4
    <?php query_posts('showposts=8&v_sortby=views&v_orderby=desc'); if (have_posts()) : while (have_posts()) : the_post(); ?>                          
    <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
    <?php echo wp_trim_words( get_the_content(),90, '...' );  ?>
    <?php endwhile; endif; wp_reset_query(); ?>
    Kendiniz css ile şekillendirirsiniz ben döngüyü paylaştım.


    <?php
        $categories = get_the_category($post->ID);
        if ($categories) { $category_ids = array();
        foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
        $args=array('category__in' => $category_ids,'post__not_in' => array($post->ID), 'showposts'=>4, 'caller_get_posts'=>1 );
        $my_query = new wp_query($args); if( $my_query->have_posts() ) { echo ''; while ($my_query->have_posts()) { $my_query->the_post();
    ?>
    
    <?php echo wp_trim_words( get_the_content(),90, '...' );  ?>
    <?php endwhile; endif; wp_reset_query(); ?>
    
    <?php } } wp_reset_query(); } ?>