sankaran
sankaran

Reputation: 143

WordPress Recent Post should be 5 with continue reading link

I set my front page as recent posts. But It display all the posts at front page.

  1. I need to display only 5 recent posts at first page.
  2. I like to have that "Continue reading" after 10 lines of the each post content.

Upvotes: 0

Views: 45

Answers (1)

Hastig Zusammenstellen
Hastig Zusammenstellen

Reputation: 4440

Q1 - Controlling Amount Of Posts Displayed

  • Dashboard -> Settings -> Reading -> Blog pages show at most -> change to 5 -> Save Changes -> test

  • If that didn't work you may be using a custom theme which controls posts per page with a function. Check functions.php for something like if ( $query->is_front_page() and in that if statement may be something similar to $query->set( 'posts_per_page', '10' ); You will want to change 10 to 5.

Q2 - Controlling Post Excerpt Length

  1. The easiest way if one has no experience working with wordpress template files is to add the <!--more--> tag in your post editor and wordpress will cut the post at exactly that spot. Here's some info about using it.

  2. You will see on the above linked page the option to customize it with a function. It requires messing around with the template files a little. Leave a comment if you want to know more about that and I can try to help you with a better explanation.

Upvotes: 2

Related Questions