MEET SITKA | A super-customizable modern WP theme!

Okay
  Print

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

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



The "Continue Reading" button in Rosemary is an excellent tool-- It gives your site's visitors a taste of your posts as well as keeps your homepage tidy & more easily navigable.

Rosemary gives you the option of either manually adding the Continue Reading button to each post, or, auto-applying the Continue Reading button to all posts with the click of a button.





MANUALLY ADDING THE CONTINUE READING BUTTON:
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.

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


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.

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/SHORTER POST EXCERPTS:
WordPress determines where to place the Read More tag within your post based on how many words it counts through. By default, Rosemary will count through 200 words before inserting the Continue Reading button. You can change the number of words by making a slight adjustment to the theme's "functions.php" file.

To access the "functions.php" file, it is likely easiest to go via Appearance > Editor > "functions.php".
Scroll to the last section of the document, titled "THE EXCERPT". You will see at the top of this section:

//////////////////////////////////////////////////////////////////
// THE EXCERPT
//////////////////////////////////////////////////////////////////
function custom_excerpt_length( $length ) {
    return 200;
}

Note where it says "return 200;" in the document. This is where you can adjust the number of words WP counts before applying the Read More tag. Change the number to whatever value you prefer and be sure to save when done.