• Hello everyone,
    I was wondering if someone could help me out or point me in the right direction on how to accomplish this.

    I have a blog that has feedwordpress plugin to grab external rss feeds from my other blogs and display them as posts. however some of the feeds have </div> and <div> tags in them that break of my theme and cause it to display incorrectly when these feed posts are displayed. I wanted to know how it would be possible to filter out <div> and </div> tags then display the post.

    I know this is possible just can’t seem to figure it out. Thought i would ask here to get some sort of lead.

    Thanks in advance,
    Aaron

Viewing 3 replies - 1 through 3 (of 3 total)
  • are the <div> tages in the posts? you should be able to create your posts without the use of <div>,

    also instead of using a feedpress you may also want to use a syndication plugin such as “Syndicate Out” Version 0.6 (which I use); you install the plugin on the website of the original post and when you create the post is will automatically syndicate it out to your other blogs immediately without having to wait for the lag of your other site to check for un updated feed every hour or so; as well updates to the post will instantly be transferred over as well.

    if the <div> tags are in the post itself and are causing the issues I suggest creating your posts without the div tags, although the div tags shouldnt technically cause problems if they are opened and closed within the post and thus constrained.

    your problem stems from the fact that your inputting tags that only contain half the info just the close tag or the open tag but not both thus they interferr with your site. as well if your <-more-> tag is in the middle of a tag such as this it will mess up your site since the other half of the tag would not be shown unless viewing the entire post

    Thread Starter pengume

    (@pengume)

    Thanks MJEG for your response and advice,
    you are right that the problem stems from inputting tags that only contain the start or the end of a div tag. Thus breaking the theme. I mistook what I said above because this particular feed after i checked is an external feed from a fitness website. In its feed It contains a </div> but no opening and once I delete it using the editor the theme go back to normal. So I was wondering going back to my original question was a way to get the_content() then check it for div tags, then exclude theme. I know there is a way to do this with a regular expression or a pregmatch or , do you feel this would be a good way to go about it?

    if you know how to do it it sounds like a great idea. i don’t know how to do it though

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Exlcude div tags on external feed’ is closed to new replies.