It adds in the paragraph tags tags at hard-returns automatically. Do you mean you want to have line-breaks and paragraphs together?
In the Excerpt field, it doesn’t recognize line-breaks/hard-returns automatically, and I’ve had to put in manually
<br>tags to force a line-break. i’d like to find a better way of doing this instead of doing it manually each time.
If you’re providing full feeds (Options > Reading, Syndication Feeds section), post content will then be run through WP’s normal text format filters. So in that case line breaks are preserved (actually, everything is).
Right … that was the way I had it before, but made the change to show “Summary” as opposed to “Full Text.” The reasoning was because I have a recipe website that the authors put a personal write-up/summary of their recipe in the “Content” field. Then, there are custom fields each for cooking time, serving size, ingredients, directions.
I wanted the RSS feed to include just the custom fields, but have not found a working solution to do that (if there were one, could someone point out how to have custom fields displayed in an RSS feed?), so I have re-entered info into the “Excerpt” field, and the RSS feeds are pulling that info. This all is happening so that the info can be synced with people’s iPods, but it’s not as slick as I was hoping for.
At this point, I’d be happy to address the line-break issues I’m having, but am open to other suggestions about this issue …..
I can provide a number of suggestions (and maybe even a solution or two), but I have a question before putting some work time in on it: Exactly how would you like your feeds to appear?
Is your ideal to display *just* this custom field data? If so, what form does it take (is it more than one field we’re talking about, since you mention a bunch up there)? How should it display in the feed?
Thanks Kafkaesqui … Hope this helps, otherwise, just let me know what I’m missing in my explanation.
What I would like to have the RSS feed display are the custom fields for the recipes in the website. There are a total of 5 custom fields being used, in conjunction with the
contentfield. The custom fields are:
<?php echo c2c_get_custom('Preparation Time'); ?>
<?php echo c2c_get_custom('Cooking Time'); ?>
<?php echo c2c_get_custom('Serving Size'); ?>
<?php echo wpautop(c2c_get_custom('Ingredients')); ?>
<?php echo wpautop(c2c_get_custom('Directions')); ?>
contentfield displays a short write-up of the recipe by the author (as described above). As I stated, I have right now the
excerptfield filled with the information from all 5 of the custom fields, which I copied and pasted in and then formated by adding
<br>tags because the line breaks were not showing up. I’d like it if I could get the custom fields to display in the RSS feed, thus saving me the heartache and pain of having to manually go in and edit information into the
You can view what the recipes look like online here. Except for the short paragraph written by the author, everything else (from Title down to Directions) would ideally be shown in the RSS feed.
This may seem ridiculous, but am setting it up so that with the help of freeware apps, one could sync recipes from the site onto their iPod and take them with. (RSS feeds is the way to go with the freeware apps … wouldn’t mind finding something though that could kick out a WP entry as a text field, and then a person could add that to their Notes on their iPod … one entry vs. them all)
Sorry … lots of questions here. Hopefully you, or someone else that has some interest in it, could help out addressing them.
Any solution to this? I too am looking for a way to incorporate custom field values onto a feed.
For example, from stew’s post, maybe something in this format:
Anyone have ideas?
I guess since I originally offered…And sorry about the delay stew278. This thread got lost in the activity of the forum. Anyway:
Custom2Feed Content plugin:
The plugin appends custom keys/values (those matching keys listed in $pass_keys array – see below) to post content in RSS2, Atom and RDF/RSS1 feed formats. Install the normal way: download file, upload to your WordPress plugin directory (wp-content/plugins/), and activate Custom to Feed Content under Plugins.
There are a few user-configurable variables in the plugin file. These can be modified through the plugin editor, or offline in a text editor. The variables are:
Array of custom keys the plugin watches for. Modify the default array list to fit your requirements. For example:
$pass_keys = array('Preparation Time', 'Cooking Time', 'Serving Time', 'Ingredients', 'Directions');
Defines whether to display custom fields in a HTML list (and what type), separate paragraphs or pseudo-tags (<key>value</key>). Options are: ‘ul’ (unordered list), ‘ol’ (or ‘ol-1’ – numbered ordered list), ‘ol-A’ (lettered ordered list), ‘dl’ (definition list), ‘p’ and ‘tag’ (pseudo-tag format).
Note the pseudo-tag format is not an XML def. Syndication formats have very specific DTDs/specs, and one cannot just stick new elements in a feed (and even if we could, appending them to the post content wouldn’t work). So sorry adistarmid, but this does not quite provide what you are seem to be asking for.
Custom separator character(s). This delimits the key:value pairs (as ‘:’ did just now). Default is
Great plugin! I have a slightly modified need howwever…
I am creating a Page that has content, excerpt, and a few custom fields.
I have created separate feed templates to serve just the_content, the_excerpt, and would like to serve JUST a custom field of my choice.
it would be great to use something like:
<content type="html"><![CDATA[<?php echo c2c_get_custom('custom'); ?>]]></content>
- The topic ‘Line Breaks in RSS Feed?’ is closed to new replies.