نمایش نتایج: از شماره 1 تا 10 , از مجموع 24

موضوع: مشکل کامل بودن متن در صفحه اصلی

Threaded View

پست قبلی پست قبلی   پست بعدی پست بعدی
  1. #17
    کاربر اخراج شده
    تاریخ عضویت
    Sep 2016
    نوشته ها
    12
    تشکر تشکر کرده 
    2
    تشکر تشکر شده 
    8
    تشکر شده در
    8 پست

    پیش فرض پاسخ : مشکل کامل بودن متن در صفحه اصلی

    نقل قول نوشته اصلی توسط T.Toosi نمایش پست ها
    در ظاهر که مشکلی نیست و داره the_excerpt() یا همون چکیده رو نشون میده، ممکن هست مشکلی در function قالب باشد یا .. باشد که باید بررسی شود، به هر حال کد زیرا جایگزین کنید و تست کنید :

    کد PHP:
    <?php
    /**
    * The default template for displaying content
    *
    * Used for both single and index/archive/search.
    *
    * @package WordPress
    * @subpackage timeplus_Themes
    * @since Road Themes 1.0
    */

    $timeplus_opt get_option'timeplus_opt' );

    $timeplus_postthumb TimePlus::timeplus_post_thumbnail_size('');

    if(
    TimePlus::timeplus_post_odd_event() == 1){
    $timeplus_postclass='even';
    } else {
    $timeplus_postclass='odd';
    }
    ?>
    <article id="post-<?php the_ID(); ?><?php post_class($timeplus_postclass); ?>>

    <?php if ( ! post_password_required() && ! is_attachment() ) : ?>
    <?php
    if ( is_single() ) { ?>
    <?php 
    if ( has_post_thumbnail() ) { ?>
    <div class="post-thumbnail"><?php the_post_thumbnail(); ?></div>
    <?php ?>
    <?php 
    }
    ?>
    <?php 
    if ( !is_single() ) { ?>
    <?php 
    if ( has_post_thumbnail() ) { ?>
    <div class="post-thumbnail">
    <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail($timeplus_postthumb); ?></a>
    </div>
    <?php ?>
    <?php 
    ?>
    <?php 
    endif; ?>

    <div class="postinfo-wrapper <?php if ( !has_post_thumbnail() ) { echo 'no-thumbnail';} ?>">

    <div class="post-info">
    <header class="entry-header">
    <div class="post-date">
    <?php echo '<span class="day">'.get_the_date('d'$post->ID).'</span><span class="month">'.get_the_date('M'$post->ID).'</span>' ;?>
    </div>
    <?php if ( is_single() ) : ?>
    <h1 class="entry-title"><?php the_title(); ?></h1>
    <?php else : ?>
    <h1 class="entry-title">
    <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
    </h1>
    <?php endif; ?>
    </header>

    <footer class="entry-meta-small">
    <?php TimePlus::timeplus_entry_meta_small(); ?>
    </footer>

    <?php if ( is_single() ) : ?>
    <div class="entry-content">
    <?php the_contentesc_html__'Continue reading <span class="meta-nav">&rarr;</span>''timeplus' ) ); ?>
    <?php wp_link_pages
    ( array( 'before' => '<div class="page-links">' esc_html__'Pages:''timeplus' ), 'after' => '</div>''pagelink' => '<span>%</span>' ) ); ?>
    </div>
    <?php else : ?>
    <div class="entry-summary">
    <?php

      $excerpt 
    explode(' 'get_the_excerpt(), 50);
      if (
    count($excerpt)>=50) {
        
    array_pop($excerpt);
        
    $excerpt implode(" ",$excerpt).'...';
      } else {
        
    $excerpt implode(" ",$excerpt);
      }    
      
    $excerpt preg_replace('`[[^]]*]`','',$excerpt);
      echo 
    $excerpt;

     
    ?>
    </div>
    <a class="readmore" href="<?php the_permalink(); ?>"><?php if(isset($timeplus_opt['readmore_text']) && $timeplus_opt['readmore_text']!=''){ echo esc_html($timeplus_opt['readmore_text']); } else { esc_html_e('Read more''timeplus');} ?></a>
    <?php endif; ?>

    <?php if ( is_single() ) : ?>
    <div class="entry-meta">
    <?php TimePlus::timeplus_entry_meta(); ?>
    </div>

    <?php if( function_exists('timeplus_blog_sharing') ) { ?>
    <div class="social-sharing"><?php timeplus_blog_sharing(); ?></div>
    <?php ?>

    <div class="author-info">
    <div class="author-avatar">
    <?php
    $author_bio_avatar_size 
    apply_filters'roadthemes_author_bio_avatar_size'68 );
    echo 
    get_avatarget_the_author_meta'user_email' ), $author_bio_avatar_size );
    ?>
    </div>
    <div class="author-description">
    <h2><?php esc_html_e'درباره نویسنده: ''timeplus'); printf'<a href="'.esc_urlget_author_posts_urlget_the_author_meta'ID' ) ) ).'" rel="author">%s</a>' get_the_author()); ?></h2>
    <p><?php the_author_meta'description' ); ?></p>
    </div>
    </div>
    <?php endif; ?>
    </div>
    </div>
    </article>

    متاسفانه با این کدها هم مشکل من حل نشد

    - - - Updated - - -

    نقل قول نوشته اصلی توسط a1994n1373 نمایش پست ها
    دوست عزیز تو فایل index.php دنبال تابع the_content بگرد و the_excerpt رو جایگزینش کن
    همچین تابعی توی فایل index.php قالب نیس
    کد index رو تو صفحه اول زدم میتونید نگاه کنید

  2. تعداد تشکر ها از goonigooni2 به دلیل پست مفید


اطلاعات موضوع

کاربرانی که در حال مشاهده این موضوع هستند

در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •