June 13th, 2010 |
Published in
technology
Tags: css, css3, developers, html5, php, rss, tools, user interface, wordpress
Warning: Invalid argument supplied for foreach() in /homepages/3/d238924033/htdocs/lewayotte.com/wp-content/plugins/yet-another-related-posts-plugin/magic.php on line 54
June 6th, 2010 |
Published in
technology
Tags: apache, api, css, dreamweaver, illustrations, php, plugin, rest, seo, subversion, theme, tips, tuning, wordpress
Warning: Invalid argument supplied for foreach() in /homepages/3/d238924033/htdocs/lewayotte.com/wp-content/plugins/yet-another-related-posts-plugin/magic.php on line 54
May 2nd, 2010 |
Published in
technology
Tags: ajax, best practices, css3, how to, html5, javascript, php, plugin, screencasts, seo, themes, wordpress
Warning: Invalid argument supplied for foreach() in /homepages/3/d238924033/htdocs/lewayotte.com/wp-content/plugins/yet-another-related-posts-plugin/magic.php on line 54
April 26th, 2010 |
Published in
technology
One of my clients needs to pull an RSS feed from a real estate virtual tour provider and display it on one of their pages. I looked into a few plugins and could not find one that was easily customizable. After a quick google search I discovered that WordPress has some built-in functions based off of SimplePie‘s easy to use RSS API.
I also needed to customize the output a little bit, which required me to rely on PHP’s preg_match and preg_replace functions. Here is some simple example for embedding a feed into your WordPess website:
<?php
include_once(ABSPATH.WPINC.'/rss.php'); // path to include script
$feed = fetch_feed('http://url.to.feed/'); // specify feed url
?>
<?php
if (!is_wp_error($feed)) :
$rss_items = $feed->get_items();
?>
// Loop through each feed item and display each item as a hyperlink.
<?php foreach ( $rss_items as $item ) : ?>
-
<?php echo $item->get_title(); ?>
<?php endforeach; ?>
Check out the codex for more information about WordPress’ function feed_fetch()… and with a little extra coding you can format the feed any way you like, see our example at NC Capital Homes.
Tags: atom, embed, php, rss, simplepie, wordpress
Warning: Invalid argument supplied for foreach() in /homepages/3/d238924033/htdocs/lewayotte.com/wp-content/plugins/yet-another-related-posts-plugin/magic.php on line 54
April 25th, 2010 |
Published in
technology
Tags: buddypress, debug, emulator, facebok, filter, fonts, freelance, htaccess, html5, icons, jquery, like button, opera, optimization, php, plugins, share, toolkits, wordpress
Warning: Invalid argument supplied for foreach() in /homepages/3/d238924033/htdocs/lewayotte.com/wp-content/plugins/yet-another-related-posts-plugin/magic.php on line 54