How do I add the "Continue Reading" button to posts in Alder?
Please note: This FAQ Article is specifically for the Alder theme.
The "Continue Reading" link in Alder 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.
Alder 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 BUTTON:
Please note: This option is for the Homepage and Archive Page layout option that displays the "Full Post Layout". The "Read More" button is auto-applied for the List Layout. See further below for adjusting this layout option.
Also known as the "Read More" tag, you can add the "Continue Reading" button 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.
To add a "Read More" tag to your post, you can navigate to the post's create/edit screen. In your post's toolbar, note the second-to-last icon. When you hover over it, it will say "Insert Read More Tag".
Clicking this icon will insert a dashed horizontal line with the word "MORE" centered within it. This is your "Read More Tag".
You can drag & drop this horizontal line anywhere in the post's body where you'd like the "Read More" button to appear. WordPress will display all of the text above this "MORE" line, and will hide everything beneath it until the visitors clicks through to your singular post page.
Please also remember to navigate to WP Dashboard > Appearance > Customize > General Settings > Homepage/Archive Post Summary Type > and selected the "Use Read More Tag" option.
AUTO-APPLYING THE CONTINUE READING BUTTON:
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 method uses the WordPress"excerpt" function. This function will filter out any HTML code including images and hyperlinks inserted at the beginning of your post (not including the Featured Image), so your excerpt will only display static text, not pictures or hyperlinks.
If it's important to you to have hyperlinked text or images within your post summary on the homepage/blog post page, you may want to consider the option above for manually inserting the "Read More" button.
To auto-apply the "Read More" tag to all of your posts, navigate to WP Dashboard >Appearance > Customize > General Settings > Homepage/Archive Post Summary Type > and choose the "Use Excerpt" option.
It's that easy!
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 uses the "excerpt" function. 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, Alder's excerpt will count through a particular number of words before placing the "Read More" tag depending on which blog layout option you're using:
- FULL POSTS: 68 words before the "Read More" button appears
- LIST POSTS: 26 words before the "Read More" button appears
You can change the number of words by making a slight adjustment to the theme's related layout file. See the instructions for each layout option below.
TO CHANGE THE EXCERPT WORD LENGTH FOR STANDARD/FULL POSTS
Navigate to WP Dashboard > Appearance > Editor > and open up the file titled "content.php"
On Line 103, you will see this line of code:
<p><?php echo alder_string_limit_words(get_the_excerpt(), 68); ?>…</p>
Do you notice the "68" 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 "68" 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 alder_string_limit_words(get_the_excerpt(), 26); ?>…</p>
Do you notice the "26" number value in that code? This is the number of words the list post layout's excerpt will display.
You can change the "26" number value to whatever number you prefer.
Please save changes to the file when finished.