انجمن


چگونه صفحه بندي مطالب  (۶ نوشته)

  • oromnet

    آفلاین
    عضو
    تعداد نوشته‌ها: ۵۰
    تشکر شده: ۴ بار
    # نوشته شده: ۱۱ سال پیش
    ۱۰ فروردین ۱۳۹۲ - ۱۰:۴۲

    با سلام
    چه طوري مي تونم مطالب رو صفحه بندي كنم يعني وقتي كه مي خوايم يك نوشته مثلا 10 صفحه اي رو بذارم اين 10 صفحه رو از هم جدا كنه و همشو تو يه صفحه نشان نده و جدا جدا براي هر كدوم نشون داده بشه .

  • ایران وردپرس

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۷۲۹
    تشکر شده: ۹۵۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۱۰ فروردین ۱۳۹۲ - ۱۱:۰۳

    درود.

    مطالعه کنید .

  • oromnet

    آفلاین
    عضو
    تعداد نوشته‌ها: ۵۰
    تشکر شده: ۴ بار
    # نوشته شده: ۱۱ سال پیش
    ۱۱ فروردین ۱۳۹۲ - ۱۲:۳۰

    IMDe گفت:
    درود.

    مطالعه کنید .

    اين single.php فايل مورد نظره الان اون كدي كه اشاره شده رو من كجا بذارم ؟
    چون هر جا كه گذاشتم مشكل پيش اومد

    <?php get_header(); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    
    	<?php
    				$postimg = get_post_meta($post->ID, "postimg", true);
    		$post_excerpt = $post->post_content;
    				?>
    <div id="news">
    <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
    قبلي : : <?php previous_post_link(); ?>
    - بعدي : <?php next_post_link(); ?>
    <div class="body"><div id="pad"> 
    
    <div class="img" style="float:left;padding-right:5px;padding-left:8px;">
    <img alt="<?php the_title(); ?>" title="<?php the_title(); ?>" src="<?php echo $postimg; ?>" width="110" height="90" /></div><?php the_content(__('Read the rest of this entry &raquo;','dnld')); ?> <br />
    <span class="author">  نویسنده: <?php the_author(); ?></span>
    -
    موضوع :  <?php the_category(', ') ?>
    -
    <?php the_tags(__('برچسبها: ','dnld'), __(', ','dnld'), __('<br />','dnld')); ?><br />
    بازدید ها:<?php if(function_exists('the_views')) { the_views(); } ?>
    <br />
    <?php comments_template(); ?>
    </div></div>
    </div><?php endwhile; ?>
    
    <?php else : ?>
    
    	<h2>یافت نشد!</h2>
    	<p>متاسفانه چیزی که دنبالش بودید در سایت وجود ندارد</p>
    <?php endif; ?>
    <?php get_footer(); ?>
  • ایران وردپرس

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۷۲۹
    تشکر شده: ۹۵۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۱۱ فروردین ۱۳۹۲ - ۱۳:۰۱

    کد زیر رو جایگزین کدهای فایل single.php کنید :

    <?php get_header(); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    
    	<?php
    				$postimg = get_post_meta($post->ID, "postimg", true);
    		$post_excerpt = $post->post_content;
    				?>
    <?php wp_link_pages();  ?>
    <div id="news">
    <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
    قبلي : : <?php previous_post_link(); ?>
    - بعدي : <?php next_post_link(); ?>
    <div class="body"><div id="pad"> 
    
    <div class="img" style="float:left;padding-right:5px;padding-left:8px;">
    <img alt="<?php the_title(); ?>" title="<?php the_title(); ?>" src="<?php echo $postimg; ?>" width="110" height="90" /></div><?php the_content(__('Read the rest of this entry &raquo;','dnld')); ?> <br />
    <span class="author">  نویسنده: <?php the_author(); ?></span>
    -
    موضوع :  <?php the_category(', ') ?>
    -
    <?php the_tags(__('برچسبها: ','dnld'), __(', ','dnld'), __('<br />','dnld')); ?><br />
    بازدید ها:<?php if(function_exists('the_views')) { the_views(); } ?>
    <br />
    <?php comments_template(); ?>
    </div></div>
    </div><?php endwhile; ?>
    
    <?php else : ?>
    
    	<h2>یافت نشد!</h2>
    	<p>متاسفانه چیزی که دنبالش بودید در سایت وجود ندارد</p>
    <?php endif; ?>
    <?php get_footer(); ?>
  • oromnet

    آفلاین
    عضو
    تعداد نوشته‌ها: ۵۰
    تشکر شده: ۴ بار
    # نوشته شده: ۱۰ سال پیش
    ۱۱ فروردین ۱۳۹۲ - ۲۰:۵۴

    IMDe گفت:
    کد زیر رو جایگزین کدهای فایل single.php کنید :

    <?php get_header(); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    
    	<?php
    				$postimg = get_post_meta($post->ID, "postimg", true);
    		$post_excerpt = $post->post_content;
    				?>
    <?php wp_link_pages();  ?>
    <div id="news">
    <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
    قبلي : : <?php previous_post_link(); ?>
    - بعدي : <?php next_post_link(); ?>
    <div class="body"><div id="pad"> 
    
    <div class="img" style="float:left;padding-right:5px;padding-left:8px;">
    <img alt="<?php the_title(); ?>" title="<?php the_title(); ?>" src="<?php echo $postimg; ?>" width="110" height="90" /></div><?php the_content(__('Read the rest of this entry &raquo;','dnld')); ?> <br />
    <span class="author">  نویسنده: <?php the_author(); ?></span>
    -
    موضوع :  <?php the_category(', ') ?>
    -
    <?php the_tags(__('برچسبها: ','dnld'), __(', ','dnld'), __('<br />','dnld')); ?><br />
    بازدید ها:<?php if(function_exists('the_views')) { the_views(); } ?>
    <br />
    <?php comments_template(); ?>
    </div></div>
    </div><?php endwhile; ?>
    
    <?php else : ?>
    
    	<h2>یافت نشد!</h2>
    	<p>متاسفانه چیزی که دنبالش بودید در سایت وجود ندارد</p>
    <?php endif; ?>
    <?php get_footer(); ?>

    جاي گذاري كردم ولي كار نكرد .!!!!!!!!!!!

  • ایران وردپرس

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۷۲۹
    تشکر شده: ۹۵۲ بار
    # نوشته شده: ۱۰ سال پیش
    ۱۱ فروردین ۱۳۹۲ - ۲۲:۱۰

    طبق آموزش هایی که در لینک دادم عمل کنید . مشکلی هم بود در اونجا مطرح کنید .

درباره‌ی این موضوع



برچسب‌ها

هیچ برچسبی نیست.