0

I am showing a wordpress feed through this client's site, http://www.redvaultproductions.com/Latest.php, but videos do not show within the posts.

Notice the second (when I wrote this) post "Mount Bachelor, Oregon," it has a video on the wordpress - seen here http://redvaultproduction.wordpress.com/2012/11/14/mount-bachelor-oregon/ - but not on my client's site.

here is what's at the top of the document

<?php
require_once('autoloader.php');

$feed = new SimplePie();

$feed->set_feed_url('http://redvaultproduction.wordpress.com/feed/');

$feed->enable_cache(true); 
$feed->set_cache_location('cache'); 
$feed->set_cache_duration(120);

$feed->init();

$feed->handle_content_type();

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

and here is what is on the document for every post.

<?php
 $item = $feed->get_item() ?>
<div class="postTitleTop"><br />
<?php print $item->get_title(); ?></div>
<?php print $item->get_content(); ?>

Can anyone help explain? I can't find any info on this.

Filburt
  • 17,626
  • 12
  • 64
  • 115
mkob
  • 55
  • 1
  • 7

1 Answers1

2

SimplePie automatically removes these HTML tags: 'base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style'.

You have to specify which tags you dont want to remove like this:

$feed = new SimplePie();
$feed->set_feed_url('http://simplepie.org/blog/feed/');

// Remove these tags from the list
$strip_htmltags = $feed->strip_htmltags;
array_splice($strip_htmltags, array_search('object', $strip_htmltags), 1);
array_splice($strip_htmltags, array_search('param', $strip_htmltags), 1);
array_splice($strip_htmltags, array_search('embed', $strip_htmltags), 1);

$feed->strip_htmltags($strip_htmltags);

$feed->init();
$feed->handle_content_type();
echo $feed->get_title();

http://simplepie.org/wiki/reference/simplepie/strip_htmltags