I was having a dickens of a time tonight extracting content from a WordPress install. The template tag the_content() always wraps your content in paragraph tags <p> and this caused me problems as I wanted to substitute <li> tags.
I found a great little plug-in called “Content Extract: Taking control of excerpts in WordPress“. Now granted it didn’t do exactly what I wanted to be sure as it would actually use the excerpt if there was one, but I modified it to my liking by always forcing it to use the actual content, strip the paragraph tags if any were present and then use the content after wrapping it in a set of unordered list tags.
Excellent find.
April 15th, 2020 at 4:32 am
Please keep on posting and sharing great ideas! Thank you for the very useful website.
https://sherbrookedentists.ca