WordPress Mobile Web
Development Beginner's Guide
Make your WordPress website mobile-friendly and get to
grips with the two hoest trends in web design—Mobile
and WordPress
Rachel McCollin
BIRMINGHAM - MUMBAI
WordPress Mobile Web Development Beginner's Guide
Copyright © 2012 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system,
or transmied in any form or by any means, without the prior wrien permission of the
publisher, except in the case of brief quotaons embedded in crical arcles or reviews.
Every eort has been made in the preparaon of this book to ensure the accuracy of the
informaon presented. However, the informaon contained in this book is sold without
warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers
and distributors will be held liable for any damages caused or alleged to be caused directly or
indirectly by this book.
Packt Publishing has endeavored to provide trademark informaon about all of the
companies and products menoned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this informaon.
First published: August 2012
Production Reference: 1170812
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-84951-572-6
www.packtpub.com
Cover Image by Faiz Fattohi ()
Credits
Author
Rachel McCollin
Reviewers
Evangelos Evangelou
Steve Graham
Todd Halfpenny
Acquision Editor
Karkey Pandey
Lead Technical Editor
Unna Shah
Technical Editors
Devdu Kulkarni
Ra Pillai
Prashant Salvi
Project Coordinator
Sai Gamare
Proofreader
Linda Morris
Indexer
Monica Ajmera Mehta
Producon Coordinators
Aparna Bhagat
Nitesh Thakur
Cover Work
Aparna Bhagat
Nitesh Thakur
About the Author
Rachel McCollin is a WordPress Developer specializing in responsive and mobile web
design. She rst learned to code as a teenager when her parents bought her a computer
with very few good games available she learned BASIC so that she could write
her own code.
Aer gaining a degree in Psychology, she worked in e-learning, moving to web design
aer eding the Labour Party's general elecon website in 2001.
Rachel now runs Compass Design, a web design agency based in Birmingham, England,
but with clients across the UK and internaonally. The agency was established in 2010
and quickly began specializing in building WordPress themes and sites, with a slant
towards responsive themes. Compass Design now prides itself on making all of the
new sites it develops mobile-friendly. Rachel tweets about WordPress, mobile
development, and many other things that catch her eye. You can follow her on
twier at
@rachelmccollin.
I've learned most of what I know about web design, and WordPress
development in parcular, from the web design community. I'd like to
thank all of the WordPress developers and designers, who have inspired
and taught me, in parcular the organizing team for WordCamp UK,
without whom I would have never got the chance to discuss my ideas
on mobile WordPress development with an audience.
A number of friends and colleagues have provided support, feedback,
and advice—they include Andy Cobley, Tracey Dixon, Kriss Fearon,
Todd Halfpenny, Sue Davis, Karen Bugg, Gary Jones, and Isaac Keyet
at Automac. My colleague Nivi Morales has taken up a lot of the
slack in terms of client work while I've been wring this book, and
given me invaluable moral support. And last, but not least, I have to
thank my husband Pete, who doesn't let the fact that talk of WordPress
and mobile websites makes his eyes glaze over, get in the way of his
unwavering support for me in running my business and wring this book.
About the Reviewers
Evangelos Evangelou currently lives in Cyprus and is the Creave Director of
PricklyPear Media.
Evangelos was born in the UK to Cypriot refugee parents from Kyrenia. His parents
came to the UK in the mid-80s where they had their own catering business.
In 2005, Evangelos completed an honors B.Sc. degree in Web & Mulmedia from
the University of Central Lancashire. His studies were later nalized with an M.A. in
Animaon. Soon aer his degree, Evangelos moved to Cyprus where he worked for
SpiderNet (now PrimeTel—currently the largest ISP on the island) creang and building
professional websites.
During his me of employment, he worked on several large-scale websites, including
three of Cyprus' biggest websites such as Cyprus Airways, PhileNews, and the
University of Cyprus. Soon aer, PricklyPear Media Ltd. was created.
Now, Evangelos spends much of his me with personal clients and template producon
with Vorel Media, founded by Evangelos Evangelou and his good friend Bryan Vorel.
Evangelos has experience in WordPress, SEO, HTML, CSS, JavaScript, and template
producon. He is also a strong forum member on SitePoint, and was recently given
a 'mentor' badge. On that note, Evangelos loves what he does and loves life!
Acknowledgement
I'd like to thank Packt Publishing, who gave me this opportunity in reviewing such a great
book. I would also like to thank SitePoint for being such a great place for web designers.
My personal life is also very important, this acknowledgment goes to my loving parents,
who made sure I was happy and had everything, achieving the unimaginable for their
children (as in their mind we're sll kids). I'd like to thank my four brothers for the support
that they gave while reviewing this book, which would have been impossible without their
constant re-enforcement.
Apart from my family, I'd like to thank everybody who helped PricklyPear Media in making
it what it is today; this includes my past employers and co-workers. I look forward to Packt
Publishing publishing more amazing books.
Steve Graham is an Entrepreneur and Web Developer specializing in WordPress
websites. As a co-owner of Internet Mentor (
meet-the-team/
), he aims to ensure that all of his clients derive measurable and
sustainable direct results that drive business growth.
Steve focuses on enabling clients, whether this is in relaon to their business websites
and social media acvies, or in a broader sense through his other great passion of
delivering presentaon and leadership skills.
Todd Halfpenny has been working as a Soware Designer for mobile telecoms
operators for over 10 years and has an innate love for anything, and everything,
related to mobile technology.
For the past four years, he has also worked on many WordPress projects, both personal
and client based. Through these projects, he has developed tons of WordPress plugins,
and among those listed in the
WordPress.org plugin repository are the highly popular
Widgets on Pages and Responsive TwentyTen.
His journey with mobile technology has also led him to develop a few Android applicaons
including Asssist, which was the rst Dribbble client for the plaorm.
Todd can be found online at
and on Twier at
@toddhalfpenny.
www.PacktPub.com
Support les, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support les and downloads related
to your book.
Did you know that Packt oers eBook versions of every book published, with PDF and ePub
les available? You can upgrade to the eBook version at
www.PacktPub.com and as a print
book customer, you are entled to a discount on the eBook copy. Get in touch with us at
for more details.
At
www.PacktPub.com, you can also read a collecon of free technical arcles, sign
up for a range of free newsleers and receive exclusive discounts and oers on Packt
books and eBooks.
Do you need instant soluons to your IT quesons? PacktLib is Packt's online digital book
library. Here, you can access, read and search across Packt's enre library of books.
Why Subscribe?
Fully searchable across every book published by Packt
Copy and paste, print and bookmark content
On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access
PacktLib today and view nine enrely free books. Simply use your login credenals for
immediate access.
Table of Contents
Preface 1
Chapter 1: Using Plugins to Make Your Site Mobile-friendly 9
Before we start 10
Plugins or responsive design – what to choose 10
How do mobile plugins work? 11
Idenfying the right plugin for our site 13
Time for acon – idenfying how your site should work on mobiles 13
Plugins that will make our site mobile 14
Time for acon – installing and conguring WPtouch 16
WordPress Mobile Pack – number two in the charts 23
Time for acon – installing and conguring WordPress Mobile Pack 24
Summary 30
Chapter 2: Using Responsive Themes 31
Mobile themes versus responsive themes 32
Idenfying the best approach for your site 33
Opons for developing a mobile site 33
Idenfying the best approach for our site 33
Twenty Eleven – conguring the default WordPress theme 35
Time for acon – conguring the Twenty Eleven theme 35
More responsive themes – installaon and conguraon 44
Scherzo – installaon and conguraon 44
Time for acon – installing and conguring the Scherzo theme 44
Ari – another clean minimal theme 47
Time for acon – installing and conguring the Ari theme 48
Codium Extend 53
Time for acon – installing and conguring the Codium Extend theme 54
More responsive themes 60
Table of Contents
[ ii ]
Taking it further – using a responsive theme just for mobile devices 61
Showing visitors dierent themes on dierent devices – how to do it 62
Stage 1 – installing and conguring themes 62
Stage 2 – installing and conguring a theme switcher 63
Time for acon – conguring the WordPress Mobile Pack
plugin as a theme switcher 63
Summary 68
Chapter 3: Seng up Media Queries 69
What you will need for this chapter 69
Working with the WordPress Editor 70
Time for acon – opening our stylesheet in the WordPress Editor 70
Creang a uid layout 71
Time for acon – digging into the Carborelli's layout styling 72
Time for acon – making our site uid 76
Moving on – planning for our media queries 79
Idenfying our breakpoints 79
In what ways should a site be dierent on dierent devices? 80
Before seng media queries – geng the browser to behave 81
Time for acon – adding the code to set our width correctly 81
Wring our media queries 82
Time for acon – wring our rst media query 82
Tesng our uid layout on a smartphone 84
Time for acon – a media query for smartphones in landscape mode 86
Reviewing what we've done 86
Summary 89
Chapter 4: Adjusng the Layout 91
Need for adjusng the layout 91
Altering the layout of our header 95
Time for acon – adjusng the header for iPads 95
Time for acon – adjusng the header layout for phones in landscape mode 98
Time for acon – adjusng the header layout for phones in portrait mode 103
Moving the sidebar below the content 105
Time for acon – moving the sidebar below the content
for tablets in portrait mode 106
Time for acon – rearranging our widgets 109
Adjusng the layout for more than two widgets 112
Three widgets side by side 112
Four widgets in a grid 112
Table of Contents
[ iii ]
Time for acon – tweaking the content and sidebar
layout for phones in landscape mode 114
Time for acon – rearranging the sidebar widgets for phones in portrait mode 117
Moving on to the footer 120
Time for acon – changing our footer layout for phones 120
Altering the layout of a fat footer 122
Reviewing what we've learned about the layout for
dierent screen widths 123
Summary 126
Chapter 5: Working with Text and Navigaon 127
A note on tesng 128
Opmizing text for small screens 128
Time for acon – changing text sengs 132
Why use ems ? 134
Time for acon – seng up text sizing in our media queries 135
Time for acon – adjusng the text size on phones in landscape mode 137
Opmizing fonts for mobile devices 140
Time for acon – specifying dierent fonts for mobile devices 141
Opmizing navigaon menus for mobile devices 142
Time for acon – changing the layout of the menu on small screens 143
Time for acon – changing the posion of the navigaon 145
Time for acon – linking to the reposioned navigaon 148
Summary 152
Chapter 6: Opmizing Images and Video 153
Making images t into a responsive layout 154
Ensuring images don't stray outside their container 154
Time for acon – making our images responsive 155
Resizing narrower images within the layout 157
Time for acon – giving our images a percentage width 158
Using CSS to resize images – the hitch 160
Proper responsive images – sending dierent image les to dierent devices 160
Are mobiles always slow? 160
Seng up our responsive images 162
Time for acon – eding the media sengs 163
Time for acon – installing the mobble plugin 164
Time for acon – using PHP to display the featured image 165
Time for acon – adding a featured image to each page 168
Featured images – the disadvantages 172
Table of Contents
[ iv ]
Adding video to our site 173
Displaying video – choosing a method 174
Using Flash 174
Inserng our video into the HTML 174
Using a service such as YouTube to stream video to our site 174
Streaming YouTube video responsively 175
Time for acon – adding a video to our site 175
Time for acon – adjusng the video width 178
Time for acon – making our video responsive 181
But are these videos truly responsive? I hear you ask 184
Summary 185
Chapter 7: Sending Dierent Content to Dierent Devices 187
Mobile-specic content – some consideraons 188
Why send dierent content to dierent devices? 188
What dierences will there be for our mobile site? 188
Methods to send dierent content to dierent devices 189
Hiding content using CSS 190
Delivering dierent content using PHP 190
Mobile First 190
Using CSS to hide page elements 191
Time for acon – hiding elements using CSS 191
Using PHP to send dierent content to dierent devices 194
Time for acon – removing a widget using PHP 195
Adding a mobile-only menu to the site 199
Idenfying the changes we need to make 199
Time for acon – seng up our mobile menus 201
Time for acon – coding mobile menus into the theme 205
Time for acon – styling the new mobile menus 210
Time for acon – adding a select menu 212
Summary 215
Chapter 8: Creang a Web App Interface 217
What is a web app and why would we develop one? 218
Developing a web app – designing the app 220
Choosing how to develop our web app 221
Pros and cons of the dierent methods 221
Creang a web app using a plugin 223
Creang a web app using a responsive design 224
Making a backup before we start 225
Hiding elements to create our web app’s home page 225
Time for acon – hiding home page content 226
Changing our web app’s design with CSS 230
Table of Contents
[ v ]
Time for acon – adjusng the header layout 231
Time for acon – eding the site descripon 236
Time for acon – seng up our web app’s navigaon 238
Time for acon – adjusng the footer layout 242
Creang a responsive web app – review 243
Using a mobile theme to create a web app 244
Creang our mobile theme les 244
Time for acon – copying our theme les to create a new theme 244
Time for acon – eding our mobile theme les 245
Time for acon – uploading and acvang our web app theme 248
Using a mobile theme to create a web app – review 251
Summary 252
Chapter 9: Adding Web App Funconality 253
What might we use a web app for? 253
Current WordPress plugins for web apps 254
Events, bookings, and management plugins 254
E-commerce and subscripon plugins 255
Geolocaon and mapping plugins 256
Social media plugins 256
Photography plugins 257
Creang our ice cream sundae builder 257
Time for acon – adding a form to our web app 258
Time for acon – integrang with PayPal 263
Time for acon – providing the visitor with direcons 267
Outside WordPress – third-party APIs 273
Summary 274
Chapter 10: Tesng and Updang your Mobile Site 275
Tesng your mobile site 276
Tesng on mobile devices 276
Resizing our browser window 277
Time for acon – using an extension to resize the Chrome browser window 278
Switching desktop Safari's User Agent to simulate an iPhone 280
Time for acon – switching our User Agent 281
Using a website to test responsive layouts 283
Time for acon – tesng your site on responsinator.com 283
Using mobile browser emulators 285
Time for acon – seng up Opera Mobile Emulator 286
Time for acon – tesng our site in Opera Mini Simulator 290
Time for acon – tesng with the Ripple extension for Chrome 291
Table of Contents
[ vi ]
Using a mobile device to update your website 295
Using the WordPress app 295
Time for acon – seng up and using the WordPress app 295
Summary 301
Pop Quiz Answers 303
Chapter 2, Using Responsive Themes 303
Chapter 3, Seng up Media Queries 303
Chapter 4, Adjusng the Layout 304
Chapter 5, Working with Text and Navigaon 305
Chapter 7, Sending Dierent Content to Dierent Devices 305
Index 307
Preface
WordPress is fast becoming the world’s most popular website for Content Management
System (CMS)—it now powers 22 percent of new domains in the USA. WordPress has a
comparavely quick learning curve and with the use of plugins and custom code, can be
made to run just about any website, no maer how complex is the funconality needed.
As more and more of us use devices such as smartphones and tablets to browse the Web
instead of a desktop computer, the need for websites to be fast and user-friendly on those
devices is geng more important. Mobile development is very hot in web design circles
right now, with constant advances in techniques such as a responsive design and mobile-rst
content strategy ensuring that websites not only look good on mobile devices, but also give
users the content and the experience they want.
If you’re one among the millions of people who own or manage a WordPress site, you’re
probably already thinking about making it mobile-friendly. If you’re a WordPress developer,
you may have been asked to develop a mobile-friendly site by a client, or possibly you’re
considering it for your own site.
As we will see in this book, there are a number of ways to do this, ranging from the quick and
dirty to the complex and potenally beauful. By using a plugin, you can quickly make your
site easier to read and interact with on mobile devices, or you can go further, harnessing the
combined power of PHP, CSS, and relevant APIs to create a web app—a website that looks and
behaves like a nave app.
This book will take you through the process of making a self-hosted WordPress site (as
opposed to a
wordpress.com site) mobile-friendly. We will be working with the site for
Carborelli’s, a cous ice cream parlor using its website to adverse its store and sell
ice cream online. You’ll learn a variety of ways to make this site look and perform beer
on mobile devices, and we’ll work up to mobile e-commerce and nally, using WordPress
to create a web app for Carborelli’s.
Preface
[ 2 ]
This book focuses on mobile development, so it’s worth idenfying exactly what we mean
when referring to dierent devices. The following are the denions of some of the devices
we will be using:
Smartphones: They include iPhones, Android phones, Windows Phone 7, Blackberry,
and any phone with a browser capable of accessing websites and displaying them
in the same way as a desktop browser would. These are the phones we will be
targeng in this book.
Feature phones: These are the phones, which include some advanced features,
in addion to making phone calls, but do not have the advanced capabilies
of smartphones and do not include a fully-featured browser. We will not be
targeng them in this book, except for in Chapter 1, Using Plugins to Make
Your Site Mobile-friendly, with mobile plugins.
Mobile devices: Mobile devices, as referred to in this book, include smartphones
and small personal devices running a mobile operang system, for example, the
iPod Touch, but not tablets.
Tablets: These are the devices with a larger display than mobile devices, but
they use a mobile operang system. These include the iPad, Samsung Galaxy
Tab, Blackberry Playbook, and Kindle Fire. We will focus on the iPad in this book,
as it is by far the most widely used tablet device.
The disncon between smartphones and feature phones is blurred, but you can nd
more informaon at
/>What this book covers
Chapter 1, Using Plugins to Make Your Site Mobile-friendly, will introduce you to some
plugins you can use to quickly make your content more accessible to people vising the
site on mobiles. It will help you choose the right plugin for your site and show you how
to congure some of the most useful ones that are available right now.
Chapter 2, Using Responsive Themes, will introduce you to themes, which have a built-in
mobile-friendly stylesheet. It will help you idenfy some of the best ones, gure out if
that’s the best approach for your site, and congure and tweak those themes.
Chapter 3, Seng up Media Queries, is where we will start to work with CSS for the
responsive design. You’ll learn how to add media queries to your theme’s stylesheet
to idenfy when visitors are viewing the site on a mobile device.
Chapter 4, Adjusng the Layout, deals with the most fundamental aspect of responsive
design. Here, we’ll explore ways to adjust the layout of the site so that it looks beer on
mobiles, including tweaking sengs for headers, sidebars, and footers.
Preface
[ 3 ]
Chapter 5, Working with Text and Navigaon, will introduce you to the most eecve ways
to deliver text to mobiles. We’ll make sure the text in our content reads well on small screens
and explore the use of ems instead of pixels to aid with, responsive design.
Chapter 6, Opmizing Images and Video, will take you through dierent approaches to
opmize images and media. We’ll look at ways to not only make images appear smaller,
but also to make sure smaller les are being delivered to mobile devices, saving on load
mes and data use. We’ll also examine ways to deliver video and other media to mobiles.
Chapter 7, Sending Dierent Content to Dierent Devices, will take you through seng up
the Carborelli’s site so that its navigaon diers on mobile devices and makes it easier for
visitors to get to what they need quickly, as the visitors to your site may want quick access
to dierent informaon depending on what kind of device they’re using.
Chapter 8, Creang a Web App Interface, covers the use of CSS to make the mobile version
of your site appear like a nave app. We’ll make changes to the Carborelli’s home page, and
navigaon in parcular, to create a really memorable mobile site.
Chapter 9, Adding Web App Funconality, will lead you further into the realm of web apps.
You’ll learn about plugins and APIs that harness the funconality of the mobile device and
give the user a more app-like experience. We’ll also start to explore mobile commerce by
working on the e-commerce secon of Carborelli’s site.
Chapter 10, Tesng and Updang your Mobile Site, will take you through the pros and cons
of tesng on actual mobile devices, dierent methods to emulate mobile devices in a desktop
browser, and how to update and edit our site using a mobile device. A mobile-friendly site
needs to work in a variety of browsers on a large array of mobile devices. You’ll learn how to
simulate some of these devices without actually owning them, and which devices it’s useful
to own or borrow to simulate the full user experience, parcularly to test web apps.
What you need for this book
This book uses a cous site to apply learning as we go along. However, you will get more
from it if you are also working with your own site (although this is not essenal). Ideally,
you will have an exisng desktop site built using WordPress and administrator access to it.
More details of what you will need are included in Chapter 1, Using plugins to make your
site mobile-friendly.
Who this book is for
This book is aimed at people with some experience of WordPress but who are new to
mobile development. It deals with self-hosted WordPress sites, and not sites hosted
on wordpress.com.
Preface
[ 4 ]
To get the most from this book, you should:
Be familiar with using WordPress to develop websites, including working with
the WordPress admin, installing themes and plugins, and eding theme les
Have a good understanding of HTML and CSS, and be able to write both
Have experience of uploading and downloading les using FTP, cPanel, or your
preferred method
Have some familiarity with PHP—you do not need to be able to write PHP but it
helps if you have come across it before
Skills that you do not need and will learn from this book include the following:
Using CSS for responsive design—creang a uid layout and dening media queries
Wring custom PHP—we will learn some examples of this but won’t cover PHP
in a lot of detail
Harnessing APIs for mobile development—the book will introduce you to some
APIs, explain what they do, and show some of them in acon.
Conventions
In this book, you will nd several headings appearing frequently.
To give clear instrucons of how to complete a procedure or task, we use:
Time for action – heading
1. Acon 1
2. Acon 2
3. Acon 3
Instrucons oen need some extra explanaon so that they make sense, so they are
followed with:
What just happened?
This heading explains the working of tasks or instrucons that you have just completed.
You will also nd some other learning aids in the book, including:
Preface
[ 5 ]
Pop quiz – heading
These are short mulple choice quesons intended to help you test your own understanding.
Have a go hero – heading
These set praccal challenges and give you ideas for experimenng with what you
have learned.
You will also nd a number of styles of text that disnguish between dierent kinds of
informaon. Here are some examples of these styles, and an explanaon of their meaning.
Code words in text are shown as follows: “This secon consists of styling for
#main div,
which contains the content and the sidebar, for each of
#content, #primary, and
#secondary, with #primary and #secondary being sidebars, or in the WordPress
terminology, widget areas:”
A block of code is set as follows:
/* main layout */
body {
margin: 20px auto;
width: 940px;
padding: 10px;
}
New terms and important words are shown in bold. Words that you see on the screen,
in menus or dialog boxes for example, appear in the text like this: “On the Mobile Switcher
screen, select the responsive theme from the Mobile theme drop-down list”.
Warnings or important notes appear in a box like this.
Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this
book—what you liked or may have disliked. Reader feedback is important for us to
develop tles that you really get the most out of.
Preface
[ 6 ]
To send us general feedback, simply send an e-mail to , and
menon the book tle via the subject of your message.
If there is a book that you need and would like to see us publish, please send us a note in
the SUGGEST A TITLE form on
www.packtpub.com or e-mail
If there is a topic that you have experse in and you are interested in either wring or
contribung to a book, see our author guide on
www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help
you to get the most from your purchase.
Downloading the example code
You can download the example code les for all Packt books you have purchased from
your account at . If you purchased this book elsewhere,
you can visit and register to have the les
e-mailed directly to you.
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do
happen. If you nd a mistake in one of our books—maybe a mistake in the text or the
code—we would be grateful if you would report this to us. By doing so, you can save
other readers from frustraon and help us improve subsequent versions of this book.
If you nd any errata, please report them by vising />support
, selecng your book, clicking on the errata submission form link, and entering
the details of your errata. Once your errata are veried, your submission will be accepted
and the errata will be uploaded on our website, or added to any list of exisng errata, under
the Errata secon of that tle. Any exisng errata can be viewed by selecng your tle from
/>Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt,
we take the protecon of our copyright and licenses very seriously. If you come across any
illegal copies of our works, in any form, on the Internet, please provide us with the locaon
address or website name immediately so that we can pursue a remedy.
Preface
[ 7 ]
Please contact us at with a link to the suspected
pirated material.
We appreciate your help in protecng our authors, and our ability to bring you
valuable content.
Questions
You can contact us at if you are having a problem
with any aspect of the book, and we will do our best to address it.
1
Using Plugins to Make Your Site
Mobile-friendly
Imagine you're the designer or administrator of an exisng website and your
client or manager tells you the site needs to be mobile-friendly, in a hurry.
There's a limited budget and no me, so what do you do?
The answer, as with many WordPress challenges, could be a plugin.
When I rst set up a mobile website for a client in 2010, there were only about
half a dozen plugins that would help achieve this. Now, if you search for the
term mobile in the WordPress plugin repository at
/>extend/plugins/
, you will get 466 results, about 10 percent of which are
plugins which will help make an exisng desktop site mobile-friendly. They do
it in dierent ways, but in this chapter, we will look at some that make your
site mobile-friendly in the quickest possible me.
WordPress uses plugins to add extra funconality to a site, which
isn't a part of the core WordPress installaon. Plugins exist
for a huge array of tasks, from backing up your site to adding
full e-commerce funconality. To nd out more about plugins,
see and
/>Using Plugins to Make Your Site Mobile-friendly
[ 10 ]
In this chapter we shall:
Learn about the dierent types of mobile plugins and how they work
Idenfy what you need to consider before choosing a plugin to make your
site mobile-friendly
Examine some of the available plugins, see how they make a site look, and
idenfy some of their pros and cons
Learn how to install and congure some of the most eecve mobile plugins
So let's get on with it!
Before we start
Before compleng the exercises in this chapter, you will need a few things ready as follows:
An exisng desktop site, running on WordPress
Administrator access to the site's WordPress dashboard or admin.
FTP access to the site if you choose to manually upload plugins instead of
using the WordPress backend
Permission to make changes to the site—it's probably safest to work on
a test site rst
A mobile device to test the mobile version of your site. These should reect
the devices your visitors will be using. We will look at tesng using devices
and emulators in Chapter 10, Tesng and Updang your Mobile Site.
Plugins or responsive design – what to choose
When making our site mobile-friendly, we have two main opons :
Using a mobile plugin to deliver a mobile theme or site to mobile devices
Using a responsive theme or making our exisng theme responsive
We will look at the responsive design in more detail later in this book. But, as using a plugin
is the quickest and easiest way to make our site mobile-friendly, that's where we'll start.