Meet Laurel! Our latest Blog & Shop WordPress theme.

Okay
  Print

How do I add the "Continue Reading" button to posts in Oleander?

Please note: This FAQ Article is specifically for the Oleander theme.




The "Continue Reading" button in Oleander is a wonderful tool-- It gives your site's visitors a taste of your posts as well as keeps your homepage tidy & more easily navigable instead of displaying 100% of every post.

Oleander gives you the option of either manually adding the "Continue Reading" link to each post, or, auto-applying the "Continue Reading" link to all posts with the click of a button. Both options have pros & cons. We'll go over the differences between the two and how to enable either option below.





MANUALLY ADDING THE CONTINUE READING LINK:

Also known as the "Read More" tag, you can add the "Continue Reading" link to a post within the post's "create/edit" screen. Some people prefer the customizability of this option as they can choose where within the post they'd like to place the button and just how much content of the post they'd like shown on the homepage. The downside is that manually inserting the "Read More" tag can be a bit tedious as it needs to be inserted into each of your posts.

For instructions on how to go about manually adding the "Read More" tag, check out: How do I add the "Continue Reading" link?



AUTO-APPLYING THE CONTINUE READING LINK:

Another option would be to have the theme automatically apply this "Read More" tag into all of your posts. This is a great option if your site already has a large number of posts that you'd rather not go through and manually apply the "Read More" tag to. Or, if you'd like the ease of simply not worrying about this extra step for all future posts.

One thing to note is that this "excerpt" function will filter out any HTML code including images at the beginning of your post (not including the Featured Image), so your excerpt will only display text, not pictures.

To auto-apply the "Read More" tag to all of your posts, you can navigate to Appearance > Customize > General Settings > scroll down a bit in the left-hand menu > choose the "Use Excerpt" option under the "Homepage/Archive Post Summary Type" section. Be sure to save.






CHANGING THE AUTO-APPLY WORD COUNT TO LENGTHEN/SHORTEN POST EXCERPTS:

If you use the option to auto-apply the "read more" tag to your posts, WordPress is using a function called "the excerpt". WordPress determines where to place the "Read More" tag within your post based on how many words it counts through from the start of the post.

By default, Oleander's excerpt will count through 80 words before inserting the "Continue Reading" link for standard posts, 24 words for grid layout posts, and 29 words for list layout posts.
You can change the number of words by making a slight adjustment to the theme's related layout file.


TO CHANGE THE EXCERPT WORD LENGTH FOR STANDARD POSTS

Navigate to Appearance > Editor > and open up the file titled "content.php"
On Line 89, you will see this line of code:

<p><?php echo sp_string_limit_words(get_the_excerpt(), 80); ?>…</p>


Do you notice the "80" number value in that code? This is the number of words the standard post layout's excerpt will display before automatically adding in the "Continue Reading" button. You can change the "80" number value to whatever number you prefer.
Please save changes to the file when finished.



TO CHANGE THE EXCERPT WORD LENGTH FOR GRID LAYOUT POSTS

Navigate to Appearance > Editor > and open up the file titled "content-grid.php"
On Line 22, you will see this line of code:

<p><?php echo sp_string_limit_words(get_the_excerpt(), 24); ?>…</p>


Do you notice the "24" number value in that code? This is the number of words the grid post layout's excerpt will display before automatically adding in the "Continue Reading" button. You can change the "24" number value to whatever number you prefer.
Please save changes to the file when finished.



TO CHANGE THE EXCERPT WORD LENGTH FOR LIST LAYOUT POSTS

Navigate to Appearance > Editor > and open up the file titled "content-list.php"
On Line 27, you will see this line of code:

<p><?php echo sp_string_limit_words(get_the_excerpt(), 29); ?>…</p>


Do you notice the "29" number value in that code? This is the number of words the list post layout's excerpt will display before automatically adding in the "Continue Reading" button. You can change the "29" number value to whatever number you prefer.
Please save changes to the file when finished.