Last update at :2024-06-28,Edit by888u
The day before yesterday, Snail saw some netizens in the group discussing about mobile websites, and they also mentioned that when the blog is accessed by mobile phone, there is no mobile adaptive display site, and it is still the same as the PC interface we see now. The main problem is that when Snail selected and modified the WordPress website theme, he did not consider the need to support mobile phone login to the mobile client. However, I also considered this issue later, but for the blog user group, we generally use computers rather than mobile phones. There are more, and the experience of displaying the PC interface is better. After all, it is not a literature or text-based website that needs to use the mobile client adaptive effect.
Now that this issue is mentioned, Snail is still preparing to figure out how to deal with this problem if the mobile phone adaptive effect is really to be used, or directly modify the existing PC website theme to be adaptive to mobile phones and PCs. This is also It’s not difficult to achieve, but the simpler method is to use the WordPress Mobile Themes plug-in and customize the themes for mobile phones and tablets. We only need to put another WordPress theme that supports mobile phones in the current website theme.
In this way, let’s demonstrate it together. You can prepare it first and use it directly when you need it later.
First, install the WordPress Mobile Themes plug-in
This plug-in can be directly searched and installed in the WordPress backend. This plug-in is written by the well-known neoease. Although it has not been updated for a long time and there are some problems after seeing the comments, it can still be used after Snail testing.
Second, choose WordPress mobile adaptive template installation
There are also some mobile-adaptive themes on the Internet. Here I have found two themes, Mobile-better (grey) and Mobile-better (white), that are commonly used by users.
We can choose a theme and copy it to the wp-content/themes directory. Personally, Snail feels that all sites with adaptive mobile experience are similar, so just be more concise. No need to use fancy pictures.
Third, select and install WordPress mobile theme
After we upload the mobile theme, we can choose it in the backend of our website \\"Appearance\\"-\\"Mobile Device Theme\\".
Here we can also choose a theme for tablets, but I personally think it is better to use PC interface themes for tablets. Now that the screens of mobile devices are getting larger and larger, this is the reason why mobile phone adaptive themes have not been used.
Finally, if we use the Hyper Cache caching plug-in and need to solve the caching problem, we need to add the following script to the functions.php file of the current mobile theme:
global $hyper_cache_stop;$hyper_cache_stop = true;
This will not cause misalignment problems on the mobile terminal. I have tested it myself and it seems that if you use the WP Super Cache plug-in, you don’t have this problem. This method is still good and saves the trouble of modifying the existing PC theme. If we are building a new website, we can consider using a compatible version when choosing a theme.
The download address for the two mobile phone themes: https://soft.laozuo.org/zhuti/Mobile-better.zip
Recommended site searches: virtual host evaluation, overseas host, best US server, website registration and cancellation, Chinese agent IP, website IP query, virtual space host, foreign vps server rental, foreign server, Hong Kong vps host rental, < /p>
发表评论