saman9074
January 5th, 2017, 14:33
سلام من این کد رو نوشتم اما میخوام متن بعد تگ more هم چاپ کنه از چه تابعی استفاده کنم؟ این فقط عنوان و خلاصه مطلب رو میاره!
<?php
include ('../wp-load.php');
$args = array( 'posts_per_page' => 5, 'category_name' => 'news');
$lastposts = get_posts( $args );
foreach ( $lastposts as $post ) :
setup_postdata( $post );
?>
<?php echo the_permalink() . "|" . the_title() . "|" . the_post_thumbnail_url( $size ). "|" .the_excerpt(); ?>
<?php
endforeach;
wp_reset_postdata();
$current = array_search( get_the_ID(), $posts );
?>
<?php
include ('../wp-load.php');
$args = array( 'posts_per_page' => 5, 'category_name' => 'news');
$lastposts = get_posts( $args );
foreach ( $lastposts as $post ) :
setup_postdata( $post );
?>
<?php echo the_permalink() . "|" . the_title() . "|" . the_post_thumbnail_url( $size ). "|" .the_excerpt(); ?>
<?php
endforeach;
wp_reset_postdata();
$current = array_search( get_the_ID(), $posts );
?>