204 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 500+ members
  • Has sold $100+ on Envato Market
  • Has collected 1+ items on Envato Market
+2 more
r0nka says

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

1383 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 10+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
wpCanyonThemes says

The forum screwed the code.

Change ”\\” to \”

204 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 500+ members
  • Has sold $100+ on Envato Market
  • Has collected 1+ items on Envato Market
+2 more
r0nka 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
  • Has been part of the Envato Community for over 5 years
  • Has referred 10+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
wpCanyonThemes says

After…

echo parse_feed($twitterFeed);
}

add

getTweet();
562 posts You Reap What You Saw
  • Has referred 200+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has collected 1+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+3 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/

1612 posts Chris Robinson
  • Located in United States
  • Has sold $500,000+ on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has been part of the Envato Community for over 6 years
+10 more
contempoinc says
204 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 500+ members
  • Has sold $100+ on Envato Market
  • Has collected 1+ items on Envato Market
+2 more
r0nka says

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

562 posts You Reap What You Saw
  • Has referred 200+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has collected 1+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+3 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