• 02-09-2020, 22:54:25
    #1
    Arkadaşlar Wordpress blogumda kullandığım premium temada, anasayfada yer alan son yazılarımın sadece başlıkları ve kapak görselleri görünüyor. Bunların altına nasıl makalenin ilk paragrafını kesit şeklinde ekleyebilirim normal diğer temalarda olduğu gibi?
  • 02-09-2020, 22:55:56
    #2
    kod kısmından anlıyorsanız, substr fonksiyonu ile belli bi karakteri yazdırabilirsiniz oraya.
  • 02-09-2020, 22:56:31
    #3
    Bilisimworld adlı üyeden alıntı: mesajı görüntüle
    kod kısmından anlıyorsanız, substr fonksiyonu ile belli bi karakteri yazdırabilirsiniz oraya.
    Maalesef...
  • 02-09-2020, 22:57:44
    #4
    son yazıların kod düzenleyiciden bularak içeriğini çekmek için <?php the_content('', ''); ?> eklemeniz lazım eğer bellir bir kısma mesela 150 harfini alsın derseniz. <?php substr(the_content('', ''),0,150); ?> yapabilirsiniz sorun oluşmaz deneyin hocam
  • 02-09-2020, 23:08:06
    #5
    chemochan adlı üyeden alıntı: mesajı görüntüle
    son yazıların kod düzenleyiciden bularak içeriğini çekmek için <?php the_content('', ''); ?> eklemeniz lazım eğer bellir bir kısma mesela 150 harfini alsın derseniz. <?php substr(the_content('', ''),0,150); ?> yapabilirsiniz sorun oluşmaz deneyin hocam

    Hocam site bozuldu bi bakabilir misiniz
  • 02-09-2020, 23:15:33
    #6
    Anasayfanin kodlarini atarsaniz yardimci olalim burdan
  • 02-09-2020, 23:17:17
    #7
    d3nnis adlı üyeden alıntı: mesajı görüntüle
    Anasayfanin kodlarini atarsaniz yardimci olalim burdan

    <?php get_header(); // add header  ?>
    
    <!-- Begin Wrap Content -->
    <div class="wrap-fullwidth">
    
    <!-- Begin Main Home Content -->
    <div class="wrap-content">
    <?php if (is_category()) { ?>
    <h3 class="index-title"><?php esc_html_e( 'Tüm yazılar:', 'bouplay-wp' ); ?> <?php single_cat_title(''); ?></h3><div class="title-home-circle"><i class="fas fa-circle"></i></div>
    <?php } elseif (is_tag()) { ?>
    <h3 class="index-title"><?php esc_html_e( 'Bu etiketle tüm yazılar:', 'bouplay-wp' ); ?> <?php single_tag_title(''); ?></h3><div class="title-home-circle"><i class="fas fa-circle"></i></div>
    <?php } elseif (is_search()) { ?>
    <h3 class="index-title"><?php printf( esc_html__( 'Arama sonuçları: %s', 'bouplay-wp' ), '' . get_search_query() . '' ); ?></h3><div class="title-home-circle"><i class="fas fa-circle"></i></div>
    <?php } elseif (is_author()) { ?>
    <h3 class="index-title"><?php esc_html_e( 'Tüm yazıları:', 'bouplay-wp' ); ?> <?php the_author(); ?></h3><div class="title-home-circle"><i class="fas fa-circle"></i></div>
    <?php } elseif (is_404()) { ?>
    <h3 class="index-title"><?php esc_html_e('Error 404 - Not Found', 'bouplay-wp'); ?></h3><div class="title-home-circle"><i class="fas fa-circle"></i></div>
    <?php esc_html_e('Sorry, but you are looking for something that isn\'t here.', 'bouplay-wp'); ?>
    <?php } else { ?><div class="clear"></div>
    <h3 class="title-homepage"><?php echo esc_attr(get_theme_mod('bouplay_wp_blog_title', 'Latest News and Articles')); ?></h3>
    <?php } ?>
    
    
    <ul class="grid_list">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <li <?php post_class('img-zoom-in') ?> id="post-<?php the_ID(); ?>">
    <?php if ( function_exists( 'getPostViews_bouplay_wp' ) ) { ?><div class="post-views"> <span><i class="icofont icofont-fire-burn" title="<?php esc_html_e( 'Views!', 'bouplay-wp' ); ?>"></i> <?php echo esc_attr(getPostViews_bouplay_wp(get_the_ID())); ?></span></div> <?php } ?>
    <?php if ( has_post_thumbnail()) { ?>
    <ul class="meta-icons-home">
    <?php if (is_sticky()) { ?><li class="sticky-lm"><i class="far fa-lightbulb"></i><span class="tooltiptext"><?php esc_html_e( 'Sticky post!', 'bouplay-wp' ); ?></span></li><?php } ?>
    </ul><div class="clear"></div>
    <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('bouplay-wp-thumbnail-blog-grid', array('title' => "")); ?></a>
    <?php } else { ?>
    <div class="noimg"></div>
    <?php } // Post Thumbnail ?>
    
    <div class="content-grid">
    <a href="<?php the_permalink(); ?>"><h2><?php esc_attr(bouplay_wp_the_title( 52, ' ..')); ?></h2></a>
    <div class="clear"></div>
    <span class="anpostdate"><?php echo get_the_date(); ?></span>
    <?php if (get_comments_number()==0) { } else { ?><span class="comm"><i class="fas fa-comment-dots"></i> <?php comments_popup_link('0', '1', '%'); ?></span><?php } ?>
    <div class="home-data"><?php if (function_exists('thumbs_rating_getlink')) { echo stripslashes(thumbs_rating_getlink()); } ?></div>
    </div><!-- end .content-grid -->
    </li>
    
    <?php endwhile; ?>
    </ul>
    
    <!-- Pagination -->
    <?php if(function_exists('wp_pagenavi')) { ?>
    <?php wp_pagenavi(); ?>
    <?php } else { ?>
    <div class="defaultpag">
    <div class="sright"><?php next_posts_link('' . esc_html__('Older Entries', 'bouplay-wp') . ' &rsaquo;'); ?></div>
    <div class="sleft"><?php previous_posts_link('&lsaquo; ' . esc_html__('Newer Entries', 'bouplay-wp') . ''); ?></div>
    </div><!-- end .defaultpag -->
    <?php } // Default Pagination ?>
    <!-- pagination -->
    
    <?php else : ?>
    <div class="not-found">
    <p><?php esc_html_e('Bir şey bulunamadı. Başka bir arama yapmayı dener misin?', 'bouplay-wp'); ?></p>
    </div><div class="clear"></div>
    <?php endif; ?>
    </div><!-- end .wrap-content -->
    
    
    <!-- Begin Sidebar (default right) -->
    <?php get_sidebar(); // add sidebar ?>
    <!-- end #sidebar (default right) -->
    
    
    <div class="clear"></div>
    </div><!-- end .wrap-fullwidth -->
    
    <?php get_footer(); // add footer  ?>
  • 03-09-2020, 00:11:06
    #8
    functions.php'ye şunu ekleyin:

    function ozet_uzunluk( $length ) {
    return 10;
    }
    add_filter( 'excerpt_length', 'ozet_uzunluk', 999 );
    10 değerini özette istediğiniz kelime sayısı ile değiştirebilirsiniz.


    ardından template-home.php'de şu kodun hemen altına;

    <a href="<?php the_permalink(); ?>"><h2><?php esc_attr(bouplay_wp_the_title( 52, ' ..')); ?></h2></a>
    şunu ekleyin:

    <span><?php the_excerpt(); ?></span>
    span etiketine sınıf atayarak .css ile şekillendirebilirsiniz.
  • 03-09-2020, 00:17:45
    #9
    d3nnis adlı üyeden alıntı: mesajı görüntüle
    functions.php'ye şunu ekleyin:

    function ozet_uzunluk( $length ) {
    return 10;
    }
    add_filter( 'excerpt_length', 'ozet_uzunluk', 999 );
    10 değerini özette istediğiniz kelime sayısı ile değiştirebilirsiniz.


    ardından template-home.php'de şu kodun hemen altına;

    <a href="<?php the_permalink(); ?>"><h2><?php esc_attr(bouplay_wp_the_title( 52, ' ..')); ?></h2></a>
    şunu ekleyin:

    <span><?php the_excerpt(); ?></span>
    span etiketine sınıf atayarak .css ile şekillendirebilirsiniz.
    Maalesef olmadı... Site adresimi pm ile gönderdim.