203 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Israel
  • Referred between 500 and 999 users
  • Sold between 100 and 1 000 dollars
r0nka says

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

1383 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Serbia
wpCanyonThemes says

The forum screwed the code.

Change ”\\” to \”

203 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Israel
  • Referred between 500 and 999 users
  • Sold between 100 and 1 000 dollars
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
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Serbia
wpCanyonThemes says

After…

echo parse_feed($twitterFeed);
}

add

getTweet();
562 posts You Reap What You Saw
  • Elite Author
  • Sold between 50 000 and 100 000 dollars
  • Has been a member for 4-5 years
  • Author had a Free File of the Month
  • Exclusive Author
  • Referred between 200 and 499 users
  • Bought between 1 and 9 items
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/

1579 posts Chris Robinson
  • United States
  • Sold between 250 000 and 1 000 000 dollars
  • Elite Author
  • Has been a member for 5-6 years
  • Author had a File in an Envato Bundle
  • Referred between 500 and 999 users
  • Author had a Free File of the Month
+5 more
contempoinc says
203 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Israel
  • Referred between 500 and 999 users
  • Sold between 100 and 1 000 dollars
r0nka says

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

562 posts You Reap What You Saw
  • Elite Author
  • Sold between 50 000 and 100 000 dollars
  • Has been a member for 4-5 years
  • Author had a Free File of the Month
  • Exclusive Author
  • Referred between 200 and 499 users
  • Bought between 1 and 9 items
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