Retrieve articles (category news) with more button working
-
I want to display the blog entries of my custom theme. The entries of the category news is displayed, but the more button placed into an article doesn’t do anything. It is always the full text displayed. This is my code in page.php:
global $more; $more = 0; global $post; $args = array('post_type' => 'post', 'category' => 8, 'orderby' => 'post_date', 'order' => 'DESC', 'post_status' => 'publish'); $news = get_posts($args); if (have_posts()) : foreach ($news as $post) : setup_postdata($post); echo '<div class="article">'; $date = get_the_date(get_option('date_format'), $post->ID); echo '<p class="article-date">' . $date . '</p>'; echo '<p class="article-heading">' . $post->post_title . '</strong></p>'; echo '<p class="article-content">' . the_content('',TRUE) . '</p>'; echo '<p class="article-more"><a href="' . get_permalink($post->ID) . '" title="Details">Details</a>'; echo '</div>'; endforeach; endif;
What I’m missing?
Thanks in advance!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Retrieve articles (category news) with more button working’ is closed to new replies.