1

Is there an easy way to get the first paragraph of a wysiwyg. In this instance I want to add it without the enclosing <p> tags into a Facebook og:description tag.

2

I used the hacksaw plugin:

{exp:eehive_hacksaw cutoff="</p>"}{copy}{/exp:eehive_hacksaw}

2
  • Glad you found a solution, but just NSM Better Meta or just a plain text-field in your field-group would have been cleaner IMO. – jrothafer Nov 28 '16 at 15:45
  • Yeah, this would include any HTML in the field, as well as images, tables, etc. And a WYSIWYG field doesn't necessarily have to contain any paragraphs. I'd suggest adding a plain textarea field for the Description. Or using an SEO plugin like SEO Lite. – Gary Reckard Nov 29 '16 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.