1. Install the MobilePress plug-in
Before this, you need to have a wordpress blog platform, and then follow the following (Picture 1) Install the MobilePress plug-in.
MobilePress plug-in is a plug-in that automatically identifies access devices. It can decide what theme to use to present content based on the user's device, which is very convenient.
Related recommendations: "WordPress Tutorial"
2. Configure MobilePress Options
After the installation is successful, it will be displayed on the left Add a menu recommendation to the side menu bar named "MobilePress". Click to expand. There will be 3 options:
- Options: Options
- Themes: Theme
- Moblie Ads: Ad code
In this step, we open the Options menu.
- Blog Title: Blog title
- Blog Description: Blog description
- Mobile Themes Directory: Mobile blog theme directory
- Force Mobile Site: Whether to force browsing in mobile mode
3. Configure MobilePress Themes options
The MobilePress plug-in itself will provide two sets of ready-made mobile themes:
-default (Default): `plugins/mobilepress/system/themes/default`
-iphone (iphone version): `plugins/mobilepress/system/themes/iphone`
Users can choose what they like The template is used for presentation.
4. Configure Moblie Ads options
Because MobilePress is a foreign plug-in, the advertising alliance is also foreign. This option is temporarily useless and can be skipped.
5. Prepare for the second development of mobile themes
The two theme templates that come with MobilePress are simple in style and have poor compatibility. We can add them to Based on this, we will conduct 2 developments to meet our personalized needs.
Development process:
- Copy the default theme template, the path is `plugins/mobilepress/system/themes/default`;
- Customize the defult theme according to your own needs The code can be developed twice.
default template file:
This template provides basic output functions and simple styles. According to the file name, each page can be easily developed twice.
The above is the detailed content of How to install mobile theme in wordpress. For more information, please follow other related articles on the PHP Chinese website!