官术网_书友最值得收藏!

Time for action—configuring the WordPress Mobile Pack plugin as a theme switcher

To configure the WordPress Mobile Pack plugin as a theme switcher, perform the following steps:

  1. Download WordPress Mobile Pack from http://wordpress.org/extend/plugins/wordpress-mobile-pack/ if you haven’t already, and activate it.
  2. On the Mobile Switcher screen, select the responsive theme from the Mobile theme drop-down list. Here, we will select Ari, as shown in the following screenshot. Click on Save Changes.
    Time for action—configuring the WordPress Mobile Pack plugin as a theme switcher
  3. Now, let’s see how the site looks, firstly on a desktop and then on a mobile. Note that the site will look the same on tablets as it does on the desktop, as the theme switcher is only activated for mobile devices. The following screenshot shows how the site looks on the desktop:
    Time for action—configuring the WordPress Mobile Pack plugin as a theme switcher

    The look of the site on the mobile is shown in the following screenshot:

    Time for action—configuring the WordPress Mobile Pack plugin as a theme switcher

What just happened?

Using a theme switcher plugin (WordPress Mobile Pack), we configured our site so that people visiting it on desktop PCs will see the existing theme, while mobile visitors will see our configured version of the Ari theme. We did this using one plugin and two themes, with no coding required.

So, how does it look? Interestingly, it doesn’t look quite the same as when we had Ari as our only theme. The widgets are above the content and we’ve lost the problem with text wrapping around the images. I don’t think the images look quite right when left-aligned like that, but we could always change that with a media query and some tweaks to our CSS (which we’ll learn about in the next two chapters).

All in all, this is a solution with which we don’t have to sacrifice our existing theme and it also gives us a mobile theme, which I think is far superior to those provided by the mobile plugins, with less than half an hour’s work and no coding. That’s what I call a result!

Pop quiz

Now we’ve spent some time getting to grips with responsive themes, let’s see what you can recall. Choose one of the options for each of the following questions:

  1. A responsive theme is one, which:
    1. Uses a different theme on mobile devices.
    2. Uses a combination of fluid layout and media queries to alter the layout for mobile devices.
    3. Has theme options that you can alter.
  2. A mobile switcher:
    1. Uses a responsive theme to display the site differently on mobiles, affecting layout, text, and images.
    2. Makes a site look different on mobiles.
    3. Switches the theme used by the site according to the device it’s being viewed on.
主站蜘蛛池模板: 米林县| 抚松县| 思南县| 高平市| 综艺| 利辛县| 通渭县| 沙洋县| 永定县| 乐亭县| 潜江市| 涿鹿县| 长沙县| 米易县| 阜康市| 华安县| 永城市| 措美县| 安泽县| 大埔区| 武功县| 台山市| 崇义县| 龙游县| 大安市| 秦安县| 金堂县| 扬州市| 监利县| 阳曲县| 平邑县| 宁陕县| 南宁市| 昌图县| 古浪县| 高碑店市| 安岳县| 天峻县| 阜宁县| 沧州市| 阿勒泰市|