• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2665

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

Set Word Limit For Archive Content or Excerpt Limit

This tutorial includes 2 code snippets which enable you to control how many words are displayed on archive pages.

Using the Genesis > Theme Settings > Content Archives settings, you can Display > Entry Excerpts or Entry Content. Based on these settings, you’ll need to choose from 1 of 2 snippets included in the download folder below, to control how many words are displayed rather than use the character limit.

Here’s what the code produces on the front page archive.

I this case the code adds a read more link after 20 words. Change the 20 in the code to change the word limit.

Based on the following question from a registered member :

I’d like to automatically break my really long posts (chapters) into smaller pages within the post, rather than using to manually do so. I would like to do a break after about 600 words. Is there a way to do this without having to use a plugin? And your code is much cleaner and better organized. 🙂 I’ve searched your site, but either I’m using the wrong keywords, or you don’t have a tutorial up for this particular problem.

Tested using the Foodie Pro child theme for Genesis however works in any parent theme and any Genesis child theme.

Register or login to access both code snippets :

Register for full access

Read More

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems