Jump to content

Meta descriptions and selecting the first 'n' characters


Gazley
 Share

Recommended Posts

Hi there,

I just wondered what other users are doing in the following scenario.

I use the summary field to contain hold text that I use as the meta description in search engines. If the field is empty, I would like to select the first 'n' characters of the body field so that at least something is being used for the meta description.

There are numerous ways to do this in PHP. I recall that ExpressionEngine had a first party add-on that did something similar to this and also added '...' to the end of the string too, so that you could use existing copy as a summary in other places, like, the home page.

Before I re-invent the wheel, I thought I would ask whether there is a standard PW approach or some handy-dandy class you could recommend?

Thanks!

--Gary

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...