May 4, 2011

Removing HTML | 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
Removing HTML
Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 (0 votes) 
February 22, 2013
9:58 pm
Avatar
Brett
Guest
Guests

How would I remove certain html tags and the content inside of it?

Example  <div class=”feedflare”>text, links, images, etc…</div>

How would I remove that from a feed is what I need to know.

Thanks,
Brett

February 23, 2013
6:55 am
Avatar
CyberSEO
Admin
Forum Posts: 3687
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline

Use Login to see this link. E.g.:

Login to see the code

February 23, 2013
6:44 pm
Avatar
Brett
Guest
Guests

I added this code and it removed ALL of the content from the posts. Not just the div.

$post[‘post_excerpt’] = preg_replace(‘/<div class=”feedflare”>.*?</div>/is’, ”, $post[‘post_excerpt’]);
$post[‘post_content’] = preg_replace(‘/<div class=”feedflare”>.*?</div>/is’, ”, $post[‘post_content’]);

February 24, 2013
8:01 am
Avatar
CyberSEO
Admin
Forum Posts: 3687
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline

It’s to give you an universal solution without seeing the actual feed contents. If you want to order a custom code, please contact me by email.

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 541

Currently Online:
11 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: 2653

Moderators: 0

Admins: 1

Forum Stats:

Groups: 1

Forums: 5

Topics: 1541

Posts: 7776

Newest Members:

frajaros, federico_pac, rexfordkent, nick.jtsevents, christophe.megaphone, r94alves

Administrators: CyberSEO: 3687