I’m creating a function in WordPress that dynamically generates basic HTML to paste into a craigslist ad from any post in a custom post type. It includes the_title, the_content, and several custom fields.
The issue comes from craigslist and styling with basic HTML. There is no padding in a single cell. The work around I came up to is to add a few non-breaking spaces in front of each line.
I want to be able to display the_content, apply a filter/function that adds a few spaces to each line break and each line breaks after a certain number of characters.
i.e. after so many characters and words,
<br>the line. then it adds
a few times at the beginning of each line.
Can it be done? Does anyone have a better suggestion that’ll work with Craigslist?
- The topic ‘Hacking The_Content();’ is closed to new replies.