April 17, 2014

Create an Access token for twitter.



Have you ever caught up in a situation like you need to show the tweets on your website, for that you’ve created an application in dev.twitter.com but you don’t know where the hell is access token and access secret?

April 14, 2014

Extract images and text from post content WordPress

Hey There, Ever had a post with lots of images in it and you wanted text and images displayed separately from the post content?
Well, before a week ago I got exactly same situation where I need to display images from post content on the top and the text under it. It was a blog page of the site and showing excerpt there.
Showing the text only without image wasn’t difficult. I applied this php code and it’s done.

 echo substr(preg_replace('/<img />]+./','',$post->post_content),0,350); 
But extracting the images especially multiple from post content and showing them on the top of the blog entry was a little bit tricky part of this job.
So, what I did to extract images from post content is put this code where I need images to be displayed
  

Kindle Apps