How do I remove the formatting and style from the imported text

Contents

[ hide ]

    For more how-tos and advice, return to How Do I …?

    Q: How do I remove the formatting and style from the imported text?

    A. You can get FeedWordPress to do this using a small filter module written in PHP. (Specifically, a small filter which made use of the syndicateditemcontent filter hook.)

    As far as I know, no-one has yet written a publicly-available filter module that strips out formatting and style from the imported text. If you are interested in getting this feature for FeedWordPress, consider making Strip HTML project.

    Does that answer your question? If not, use the Talk page to comment on this post or contact me by e-mail for help. Be sure to describe what you are trying to do, and the problems you are running into, with as much detail as possible.

    For more how-tos and advice, return to How Do I …?

    This page is a Wiki! Log in or register an account to edit.

    4 thoughts on “How do I remove the formatting and style from the imported text

    1. I seem to be having a slightly different problem but not sure where to post.

      The formatting comes along just fine, in fact I’m running the feed(s) through Yahoo Pipes as well. However, it seems that the posts that FeedWordPress creates don’t work well with built-in wordpress formatting for built-in elements.

      For example. I took a feed that posts new items as drafts. Then I go into the newly created draft, upload some images and create a gallery with the shortcode [gallery link="file"] But then the gallery doesn’t display, instead it just prints out the shortcode as plain text.

      If I then remove the custom fields created by FeedWordpress, and resave it the post seems to work fine.

      Any ideas on that?

      • Hi Oscar,

        By default FWP attempts to exempt syndicated posts from being processed by normal WordPress formatting filters. But given that you are actively editing posts as they come in, my recommendation would be to turn off this setting. You can do so by going to Syndication –> Posts & Links, scrolling down to the Formatting box, and flipping the setting there from “Protect…” to “Expose…” Save Changes, go back to your front page, and see if shortcodes are now being processed properly.

    2. Howdy. Some help with basic filtering would be good. It seems like we’ve run into some issues with formatting on alternate versions of WP and FWP, where pre-existing double line breaks in the imported feed (from our site A output, non WP site), when brought into our Site B.

      We end up with br/ br/ br / br / tags in place of br/ br/ html already in the existing feed. Each <br/> tag gets a new
      tag after it, so we get double double line breaks.

      A simple filter for that would be fantastic! – or, the option to strip out a <br/> when it’s on a line by itself, so that when the added
      gets added at END of a valid text string (paragraph), we don’t have dupes.

      HELP :-)

      I’m making a new donation right now!

      Thanks!

      Christopher

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>