May 4, 2011

Trying to strip HTML from the post as it is pulled from an RSS feed | CyberSEO Pro | Support Forum

Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_TopicIcon
Trying to strip HTML from the post as it is pulled from an RSS feed
Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 (0 votes) 
October 22, 2013
8:19 am
Avatar
ryan4021
Guest
Guests

Hello,

I’m trying to pull posts from an RSS feed and inside the custom PHP section I’m putting this

$post[‘post_content’] = strip_tags($post[‘post_content’]);

Isn’t this supposed to strip all the tags from the main post content itself and then update? It doesn’t seem to be working for me at all when using this.

Any help would be appreciated, thanks.

October 22, 2013
11:51 pm
Avatar
CyberSEO
Admin
Forum Posts: 3689
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline

Yes it is. But the code will affect new posts only. The existing ones won’t be modified. Also you may want to strip tags from the post excerpts too:

Login to see the code

 

October 24, 2013
7:52 am
Avatar
ryan4021
Guest
Guests

Thanks

I have one more question, i’m pulling a full text version of the google news RSS feed and it seems to work properly in every regard but one thing, it shows sometimes at the beginning of the post content the original date of the article (since its pulling from the full content of the original article itself). Is there a way to ‘detect’ this with php and then remove it possibly with str_replace or something like that? 

October 25, 2013
1:07 am
Avatar
CyberSEO
Admin
Forum Posts: 3689
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline

Seems it will require some Login to see this link. Contact me on email with the examples of what exactly must be removed.

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 541

Currently Online:
5 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ninja321: 84

s.baryshev.aoasp: 64

Freedom: 61

MediFormatica: 49

B8europe: 47

saviulisse67: 45

Member Stats:

Guest Posters: 338

Members: 2654

Moderators: 0

Admins: 1

Forum Stats:

Groups: 1

Forums: 5

Topics: 1541

Posts: 7779

Newest Members:

pu.analytics.ee, frajaros, federico_pac, rexfordkent, nick.jtsevents, christophe.megaphone

Administrators: CyberSEO: 3689