premier 142 ارسال شده در اردیبهشت 92 گزارش بازنشر ارسال شده در اردیبهشت 92 با سلام کد زیر را میخام فقط مطالب دسته 2 را نمایش بده ولی این تمام مطالب سایت را نمایش میده چکار کنمش؟<?php/*Template Name: news*/?><?php get_header(); ?><?php$args = array('posts_per_page' => 5,);if ( $paged > 1 ) { $args['paged'] = $paged;}$my_query = new WP_Query($args); ?><?php if ( $my_query->have_posts() ) : ?> <?php while ( $my_query->have_posts() ) : $my_query->the_post(); ?> <?php //necessary to show the tags global $wp_query; $wp_query->in_the_loop = true; ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php get_search_form(); ?><?php endif; ?><div class="navigation"> <div class="alignleft"><?phpif ( !$max_page ) { $max_page = $my_query->max_num_pages;}if ( !$paged ) { $paged = 1;}$nextpage = intval($paged) + 1;if ( !is_single() && ( empty($paged) || $nextpage <= $max_page) ) { $attr = apply_filters( 'next_posts_link_attributes', '' ); echo '<a href="' . next_posts( $max_page, false ) . "\" $attr>". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', '« Older Entries') .'</a>';}?></div> <div class="alignright"><?phpif ( !is_single() && $paged > 1 ) { $attr = apply_filters( 'previous_posts_link_attributes', '' ); echo '<a href="' . previous_posts( false ) . "\" $attr>". preg_replace( '/&([^#])(?![a-z]{1,8};)/', '&$1', 'Newer Entries »' ) .'</a>';}?></div></div><?php get_sidebar(); ?><?php get_footer(); ?> 1 لینک به ارسال
عبدالماجد 3203 ارسال شده در اردیبهشت 92 گزارش بازنشر ارسال شده در اردیبهشت 92 تست کنید :<?php/*Template Name: news*/?><?php get_header(); ?><?php$args = array('posts_per_page' => 5,);if ( $paged > 1 ) { $args['paged'] = $paged;}$my_query = new WP_Query("showposts=15&cat=3,6"); ?><?php if ( $my_query->have_posts() ) : ?> <?php while ( $my_query->have_posts() ) : $my_query->the_post(); ?> <?php //necessary to show the tags global $wp_query; $wp_query->in_the_loop = true; ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php get_search_form(); ?><?php endif; ?><div class="navigation"> <div class="alignleft"><?phpif ( !$max_page ) { $max_page = $my_query->max_num_pages;}if ( !$paged ) { $paged = 1;}$nextpage = intval($paged) + 1;if ( !is_single() && ( empty($paged) || $nextpage <= $max_page) ) { $attr = apply_filters( 'next_posts_link_attributes', '' ); echo '<a href="' . next_posts( $max_page, false ) . "\" $attr>". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', '« Older Entries') .'</a>';}?></div> <div class="alignright"><?phpif ( !is_single() && $paged > 1 ) { $attr = apply_filters( 'previous_posts_link_attributes', '' ); echo '<a href="' . previous_posts( false ) . "\" $attr>". preg_replace( '/&([^#])(?![a-z]{1,8};)/', '&$1', 'Newer Entries »' ) .'</a>';}?></div></div><?php get_sidebar(); ?><?php get_footer(); ?>توی کد زیر :cat=3,6عدد 3 و 6 آیدی دسته هستن ؛ شما میتونید آیدی دسته هایی که میخواهید نشون داده بشه رو بزارید. 7 لینک به ارسال
premier 142 ارسال شده در اردیبهشت 92 مالک گزارش بازنشر ارسال شده در اردیبهشت 92 تست کنید :<?php/*Template Name: news*/?><?php get_header(); ?><?php$args = array('posts_per_page' => 5,);if ( $paged > 1 ) {$args['paged'] = $paged;}$my_query = new WP_Query("showposts=15&cat=3,6"); ?><?php if ( $my_query->have_posts() ) : ?><?php while ( $my_query->have_posts() ) :$my_query->the_post(); ?> <?php //necessary to show the tags global $wp_query; $wp_query->in_the_loop = true; ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div><?php endwhile; ?><?php else : ?><h2 class="center">Not Found</h2><p class="center">Sorry, but you are looking for something that isn't here.</p><?php get_search_form(); ?><?php endif; ?><div class="navigation"><div class="alignleft"><?phpif ( !$max_page ) {$max_page = $my_query->max_num_pages;}if ( !$paged ) {$paged = 1;}$nextpage = intval($paged) + 1;if ( !is_single() && ( empty($paged) || $nextpage <= $max_page) ) {$attr = apply_filters( 'next_posts_link_attributes', '' );echo '<a href="' . next_posts( $max_page, false ) . "\" $attr>". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', '« Older Entries') .'</a>';}?></div><div class="alignright"><?phpif ( !is_single() && $paged > 1 ) {$attr = apply_filters( 'previous_posts_link_attributes', '' );echo '<a href="' . previous_posts( false ) . "\" $attr>". preg_replace( '/&([^#])(?![a-z]{1,8};)/', '&$1', 'Newer Entries »' ) .'</a>';}?></div></div><?php get_sidebar(); ?><?php get_footer(); ?>توی کد زیر :cat=3,6عدد 3 و 6 آیدی دسته هستن ؛ شما میتونید آیدی دسته هایی که میخواهید نشون داده بشه رو بزارید.تست کردم ولی navigation کار نمیکنهیعنی میره صفحه بعد ولی همین مطالب صفحه اول را نشان میدهمثلا: میره صفحه 2 ولی مطالب همان مطالب قبلی هست و مطالب بعدی را نمایش نمیده 1 لینک به ارسال
premier 142 ارسال شده در اردیبهشت 92 مالک گزارش بازنشر ارسال شده در اردیبهشت 92 کسی نیست کمک کنه لینک به ارسال
Mohammad 1620 ارسال شده در اردیبهشت 92 گزارش بازنشر ارسال شده در اردیبهشت 92 لطفا اسپم نکنید.مطمئن باشید اگه کسی بدونه کمک میکنه.تست کنید:<?php/*Template Name: news*/?><?php get_header(); ?><?php$args = array('posts_per_page' => 5,'cat' => 3,6);if ( $paged > 1 ) { $args['paged'] = $paged;}$my_query = new WP_Query($args); ?><?php if ( $my_query->have_posts() ) : ?> <?php while ( $my_query->have_posts() ) : $my_query->the_post(); ?> <?php //necessary to show the tags global $wp_query; $wp_query->in_the_loop = true; ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php get_search_form(); ?><?php endif; ?><div class="navigation"> <div class="alignleft"><?phpif ( !$max_page ) { $max_page = $my_query->max_num_pages;}if ( !$paged ) { $paged = 1;}$nextpage = intval($paged) + 1;if ( !is_single() && ( empty($paged) || $nextpage <= $max_page) ) { $attr = apply_filters( 'next_posts_link_attributes', '' ); echo '<a href="' . next_posts( $max_page, false ) . "\" $attr>". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', '« Older Entries') .'</a>';}?></div> <div class="alignright"><?phpif ( !is_single() && $paged > 1 ) { $attr = apply_filters( 'previous_posts_link_attributes', '' ); echo '<a href="' . previous_posts( false ) . "\" $attr>". preg_replace( '/&([^#])(?![a-z]{1,8};)/', '&$1', 'Newer Entries »' ) .'</a>';}?></div></div><?php get_sidebar(); ?><?php get_footer(); ?> 4 لینک به ارسال
premier 142 ارسال شده در اردیبهشت 92 مالک گزارش بازنشر ارسال شده در اردیبهشت 92 لطفا اسپم نکنید.مطمئن باشید اگه کسی بدونه کمک میکنه.تست کنید:<?php/*Template Name: news*/?><?php get_header(); ?><?php$args = array('posts_per_page' => 5,'cat' => 3,6);if ( $paged > 1 ) { $args['paged'] = $paged;}$my_query = new WP_Query($args); ?><?php if ( $my_query->have_posts() ) : ?> <?php while ( $my_query->have_posts() ) : $my_query->the_post(); ?> <?php //necessary to show the tags global $wp_query; $wp_query->in_the_loop = true; ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php get_search_form(); ?><?php endif; ?><div class="navigation"> <div class="alignleft"><?phpif ( !$max_page ) { $max_page = $my_query->max_num_pages;}if ( !$paged ) { $paged = 1;}$nextpage = intval($paged) + 1;if ( !is_single() && ( empty($paged) || $nextpage <= $max_page) ) { $attr = apply_filters( 'next_posts_link_attributes', '' ); echo '<a href="' . next_posts( $max_page, false ) . "\" $attr>". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', '« Older Entries') .'</a>';}?></div> <div class="alignright"><?phpif ( !is_single() && $paged > 1 ) { $attr = apply_filters( 'previous_posts_link_attributes', '' ); echo '<a href="' . previous_posts( false ) . "\" $attr>". preg_replace( '/&([^#])(?![a-z]{1,8};)/', '&$1', 'Newer Entries »' ) .'</a>';}?></div></div><?php get_sidebar(); ?><?php get_footer(); ?>انجام دادم ولی ایندفعه not found دادکد زیر را پیدا کردم صفحه بندیش درسته فقط تنها مشکلی که دارم اینه که کد زیر تمام نوشته های سایت را قرار میده و نمیتونم کاریش کنم که فقط دسته خاص یا همون cat=1 را نشون بده چطوری میتونم این کارا کنم؟<?php/*Template Name: news*/?><?php get_header(); ?><?php$args = array('posts_per_page' => 5,'cat' => 3,6);if ( $paged > 1 ) { $args['paged'] = $paged;}$my_query = new WP_Query($args); ?><?php if ( $my_query->have_posts() ) : ?> <?php while ( $my_query->have_posts() ) : $my_query->the_post(); ?> <?php //necessary to show the tags global $wp_query; $wp_query->in_the_loop = true; ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php get_search_form(); ?><?php endif; ?><div class="navigation"> <div class="alignleft"><?phpif ( !$max_page ) { $max_page = $my_query->max_num_pages;}if ( !$paged ) { $paged = 1;}$nextpage = intval($paged) + 1;if ( !is_single() && ( empty($paged) || $nextpage <= $max_page) ) { $attr = apply_filters( 'next_posts_link_attributes', '' ); echo '<a href="' . next_posts( $max_page, false ) . "\" $attr>". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', '« Older Entries') .'</a>';}?></div> <div class="alignright"><?phpif ( !is_single() && $paged > 1 ) { $attr = apply_filters( 'previous_posts_link_attributes', '' ); echo '<a href="' . previous_posts( false ) . "\" $attr>". preg_replace( '/&([^#])(?![a-z]{1,8};)/', '&$1', 'Newer Entries »' ) .'</a>';}?></div></div><?php get_sidebar(); ?><?php get_footer(); ?> لینک به ارسال
Mohammad 1620 ارسال شده در اردیبهشت 92 گزارش بازنشر ارسال شده در اردیبهشت 92 کد که همونه!در مقابل cat اعداد 3و 6هستند.اونه رو تغییر بدید. 1 لینک به ارسال
premier 142 ارسال شده در اردیبهشت 92 مالک گزارش بازنشر ارسال شده در اردیبهشت 92 انجام دادم ولی ایندفعه not found دادکد زیر را پیدا کردم صفحه بندیش درسته فقط تنها مشکلی که دارم اینه که کد زیر تمام نوشته های سایت را قرار میده و نمیتونم کاریش کنم که فقط دسته خاص یا همون cat=1 را نشون بده چطوری میتونم این کارا کنم؟<?php/*Template Name: news*/?><?php get_header(); ?><?php$args = array('posts_per_page' => 5,'cat' => 3,6);if ( $paged > 1 ) {$args['paged'] = $paged;}$my_query = new WP_Query($args); ?><?php if ( $my_query->have_posts() ) : ?><?php while ( $my_query->have_posts() ) :$my_query->the_post(); ?> <?php //necessary to show the tags global $wp_query; $wp_query->in_the_loop = true; ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div><?php endwhile; ?><?php else : ?><h2 class="center">Not Found</h2><p class="center">Sorry, but you are looking for something that isn't here.</p><?php get_search_form(); ?><?php endif; ?><div class="navigation"><div class="alignleft"><?phpif ( !$max_page ) {$max_page = $my_query->max_num_pages;}if ( !$paged ) {$paged = 1;}$nextpage = intval($paged) + 1;if ( !is_single() && ( empty($paged) || $nextpage <= $max_page) ) {$attr = apply_filters( 'next_posts_link_attributes', '' );echo '<a href="' . next_posts( $max_page, false ) . "\" $attr>". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', '« Older Entries') .'</a>';}?></div><div class="alignright"><?phpif ( !is_single() && $paged > 1 ) {$attr = apply_filters( 'previous_posts_link_attributes', '' );echo '<a href="' . previous_posts( false ) . "\" $attr>". preg_replace( '/&([^#])(?![a-z]{1,8};)/', '&$1', 'Newer Entries »' ) .'</a>';}?></div></div><?php get_sidebar(); ?><?php get_footer(); ?>ببخشید کد اینه :<?php/*Template Name: news*/?><?php get_header(); ?><?php// the query to set the posts per page to 3$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;$args = array('posts_per_page' => 3, 'paged' => $paged );query_posts($args); ?><!-- the loop --><?php if ( have_posts() ) : while (have_posts()) : the_post(); ?> <!-- rest of the loop --><div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div><?php endwhile; ?><!-- pagination --><?php next_posts_link(); ?><?php previous_posts_link(); ?><?php else : ?><!-- No posts found --><?php endif; ?><?php get_sidebar(); ?><?php get_footer(); ?> لینک به ارسال
Mohammad 1620 ارسال شده در اردیبهشت 92 گزارش بازنشر ارسال شده در اردیبهشت 92 تست:<?php/*Template Name: news*/?><?php get_header(); ?><?php// the query to set the posts per page to 3$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;$args = array(posts_per_page=3&paged=$paged&cat=1);query_posts($args); ?><!-- the loop --><?php if ( have_posts() ) : while (have_posts()) : the_post(); ?> <!-- rest of the loop --><div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?><!-- pagination --><?php next_posts_link(); ?><?php previous_posts_link(); ?><?php else : ?><!-- No posts found --><?php endif; ?><?php get_sidebar(); ?><?php get_footer(); ?>به جای 1 ای دی دسته مورد نظرکد قبلی همدرست بود ولی چون در دسته 3و6 مطلبی وجود نداره میگه not found 2 لینک به ارسال
premier 142 ارسال شده در اردیبهشت 92 مالک گزارش بازنشر ارسال شده در اردیبهشت 92 تست:<?php/*Template Name: news*/?><?php get_header(); ?><?php// the query to set the posts per page to 3$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;$args = array(posts_per_page=3&paged=$paged&cat=1);query_posts($args); ?><!-- the loop --><?php if ( have_posts() ) : while (have_posts()) : the_post(); ?> <!-- rest of the loop --><div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div><?php endwhile; ?><!-- pagination --><?php next_posts_link(); ?><?php previous_posts_link(); ?><?php else : ?><!-- No posts found --><?php endif; ?><?php get_sidebar(); ?><?php get_footer(); ?>به جای 1 ای دی دسته مورد نظرکد قبلی همدرست بود ولی چون در دسته 3و6 مطلبی وجود نداره میگه not foundعزیز کد قبلی را آی دی دسته ام را گذاشتم ولی ارور not found داد.کد جدید هم دریم ویر لاین 10 را خطا میگیره لینک به ارسال
Mohammad 1620 ارسال شده در اردیبهشت 92 گزارش بازنشر ارسال شده در اردیبهشت 92 تست:<?php/*Template Name: news*/?><?php get_header(); ?><?php// the query to set the posts per page to 3$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;$args = array('posts_per_page' => 3, 'paged' => $paged, 'cat' => 10 );query_posts($args); ?><!-- the loop --><?php if ( have_posts() ) : while (have_posts()) : the_post(); ?> <!-- rest of the loop --><div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?><!-- pagination --><?php next_posts_link(); ?><?php previous_posts_link(); ?><?php else : ?><!-- No posts found --><?php endif; ?><?php get_sidebar(); ?><?php get_footer(); ?> 2 لینک به ارسال
premier 142 ارسال شده در اردیبهشت 92 مالک گزارش بازنشر ارسال شده در اردیبهشت 92 تست:<?php/*Template Name: news*/?><?php get_header(); ?><?php// the query to set the posts per page to 3$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;$args = array('posts_per_page' => 3, 'paged' => $paged, 'cat' => 10 );query_posts($args); ?><!-- the loop --><?php if ( have_posts() ) : while (have_posts()) : the_post(); ?> <!-- rest of the loop --><div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div><?php endwhile; ?><!-- pagination --><?php next_posts_link(); ?><?php previous_posts_link(); ?><?php else : ?><!-- No posts found --><?php endif; ?><?php get_sidebar(); ?><?php get_footer(); ?>یک دنیا ممنونتم اینقدر گشتم و گشتم ولی پیدا نکردم واقعا دستت درد نکنه حیف که یکبار تشکر داره وگر نه بیشتر لایک میکردم 1 لینک به ارسال
imanfakhar 26231 ارسال شده در اردیبهشت 92 گزارش بازنشر ارسال شده در اردیبهشت 92 <?php/*Template Name: news*/get_header();$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;$args = array('posts_per_page' => 3, 'paged' => $paged );query_posts($args); $recent = new WP_Query("cat=آی دی دسته");if($recent->have_posts()) : while($recent->have_posts()) : $recent->the_post();?><div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div><?php endwhile; ?><?php next_posts_link(); ?><?php previous_posts_link(); ?><?php else : ?><?php endif; ?><?php get_sidebar(); ?><?php get_footer(); ?> 2 لینک به ارسال
پست های پیشنهاد شده
لطفا برای ارسال دیدگاه وارد شوید
شما بعد از اینکه وارد حساب کاربری خود شدید می توانید دیدگاهی ارسال کنید
ورود به حساب کاربری