206 posts
  • Author Level 2
  • Affiliate Level 6
  • 6 Years of Membership
  • Collector Level 1
+2 more
ronkathemes
says

@wpCanyonThemes On the PHP snippet it tells me that the 2nd line($stepOne …) as an syntax error.
what’s wrong?

1383 posts
  • 6 Years of Membership
  • Affiliate Level 2
  • Collector Level 2
  • Exclusive Author
+1 more
wpCanyonThemes
says

The forum screwed the code.

Change ”\\” to \”

206 posts
  • Author Level 2
  • Affiliate Level 6
  • 6 Years of Membership
  • Collector Level 1
+2 more
ronkathemes
says

What am i doing wrong?

                <div id="twit">
                <p>
<?php function parse_feed($feed) {
    $stepOne = explode("<content type=html\?>", $feed);
    $stepTwo = explode("", $stepOne[1]);
    $tweet = $stepTwo[0];
    $tweet = str_replace("&lt;", "<", $tweet);
    $tweet = str_replace("&gt;", ">", $tweet);
    return $tweet;
}

function getTweet(){
$feed = "http://search.twitter.com/search.atom?q=from:ronkaa&rpp=1";
$twitterFeed = file_get_contents($feed);
echo parse_feed($twitterFeed);
}
?>
                </p>
                </div>

I paste this code in my theme and it doesn’t echo any thing ..

1383 posts
  • 6 Years of Membership
  • Affiliate Level 2
  • Collector Level 2
  • Exclusive Author
+1 more
wpCanyonThemes
says

After…

echo parse_feed($twitterFeed);
}

add

getTweet();
562 posts You Reap What You Saw
  • Weekly Top Seller
  • Elite Author
  • Author Level 7
  • 6 Years of Membership
+4 more
Bluz
says

That’s how I use it on my site and it does not depend on PHP only jQuery is required. http://css-tricks.com/snippets/jquery/display-last-tweet/

1680 posts Chris Robinson
  • Elite Author
  • Author Level 10
  • 7 Years of Membership
  • United States
+13 more
contempoinc
says
206 posts
  • Author Level 2
  • Affiliate Level 6
  • 6 Years of Membership
  • Collector Level 1
+2 more
ronkathemes
says

I cant get any of the code you guys gave me to work :S

562 posts You Reap What You Saw
  • Weekly Top Seller
  • Elite Author
  • Author Level 7
  • 6 Years of Membership
+4 more
Bluz
says

I cant get any of the code you guys gave me to work :S

Use the one I posted ron. It’s very simple and works great.

by
by
by
by
by
by