WordPress iPhone Theme
So, after I’ve been asked (or more like beg) by quite a couple of people, whether I could finally release my iPhone theme for WordPress, I’m now finally taking the time to do so.
Since I’ve already posted a quite descriptive post regarding the theme itself, I won’t beat around the bush now. For those who haven’t read the initial story, here you can review it. You can download the theme by clicking the link at the bottom of this page. Note, that the theme needs the theme-switcher-reloaded Plugin for WordPress to be up and running to work properly. Additional to that, you will need to make some changes to your actual theme, which allows the user to actually switch to the iPhone theme. These changes depend on what theme you are using, but in general you need to modify your theme’s header.php and include a code like this one:
<?php
if(empty($_COOKIE["iphonetheme" . COOKIEHASH]))
{
if (stristr($_SERVER['HTTP_USER_AGENT'], 'iPhone'))
{
echo "<div style=\"background-color: #F66; color: #fff; padding: 8px;\">";
echo "You seem to be browsing this site from your iPhone or iPod Touch.";
echo "Would you like to <a href=\"?wptheme=iphone\" title=\"\">change to the optimized site</a>?";
echo "</div>";
}
}
?>
The iPhone Theme itself already contains a button which provides you to switch back to the regular theme.
However, feel free to download, distribute, modify and have fun with my WordPress iPhone Theme – it’s released under GNU GPLv2!
Download: WordPress iPhone 0.1
connecting peopleThank you for providing such helpful information…please keep it up! This is excellent “keep moving” inspiration & support! Incredibly valuable info for people like me who has the idea.
Thanks for the theme, I just added this with the mobilepress plugin on the corporate site. And am currently tweaking it to show the same content as shown in the generic mobile version.
I used an image magick / shell script to pre generate 366 images for calendar instead of the ‘Tuesday/9′ from you kit, such that the news in my home page would show the correct date icon, using the_time()
Hi Mathew,
I just took a look at your corporate site and it looks pretty cool on the iPhone, especially with the Calendar-Images. Very nice!
Though, I’d change the font on the calendars and I’d put the start page into a white container… it’s hard to read the introduction-text on the striped background.
Cool job! Feel free to post a link to your modification, if you’d like to publish it.
Great job Marius – this is an incredible theme. If you’re ever up for it, I’d love to see the calendar icons format automatically (assuming Matthew isn’t publishing his solution).
Another great feature would be the ability to select the page icon within the WP admin panel.
Even without these features, this is a top-notch theme.
Hi Sam,
first of all, thank you for the compliment. I’m glad you like the Theme and I’m happy to see people using the stuff I publish.
I don’t know when I’ll finally be able to upgrade my WordPress iPhone Theme to the latest version of iWebKit and implement the features you (and others) have mentioned, but yet I’m still looking forward to do so, as soon as I’ll find the time.
Thanks again,
enjoy!
Hi,
Great stuff!!
I just downloaded the theme and installed it into the themes directory and it all works a treat, my only question is how to I point to the iphone theme using the href above, i.e., <a href=”?wptheme=iphone” title=”" rel=”nofollow”>.
If someone could point me in the right direction that would be grand.
Thanks again
Hi andres,
pointing at the iPhone Theme works just as I described it in my post. You need to modify your actual theme’s header.php (not the iPhone theme’s, but the one you’re using for regular browsers), so that it recognizes when an iPhone views your blog and displays a proper message on the top, which let’s the user change to the iPhone theme, by clicking the link.
Enjoy!
Hi Marius,
I apologise for not been clearer. I added the php code above into the current wordpress header.php theme file and it displays correctly, the problem is that when I click the link using my iphone it refreshes the page but the same theme appears.
I thought that perhaps the url string needed to contain my actual url as a pretext not just ‘?wptheme=iphone\’.
Hope this makes more sense? btw, I added the theme into the themes folder within the wp-content folder of wordpress, so I know its in the right place.
Cheers
Andres
Hi Andres,
do you have the WordPress Theme Switcher Reloaded installed? -> http://themebot.com/webmaster-tools/1-wordpress-theme-switcher-reloaded
Enjoy.
Hi Marius,
Worked a treat and now works a treat
– very happy!!
Cheera again
Andres
Been working with your iPhone theme and trying to get it tweaked the way I like it(Love it by the way). Was wondering if I was doing something wrong, because when the comments for a post are more than one sentence, it just disappears. Is it supposed to only show the first few words? Because I was wondering if it would be possible to make it link to a new page with the entire comment.
Thank you so much, I was looking for something like this. WpTouch is so restrictive!
First, thanks for the theme.
I’m porting this theme to be the default iPhone theme for “Tweet Press” http://140plus.com
I have the same question as Scott, regarding the comments, which appear to be setup to be clipped. Is there meant to be a way for a user to view the entire comment?
For the calendar icons, FWIW, I’ve redone them in Pure CSS, with the help of this work: http://graphicpeel.com/cssiosicons