Home >CMS Tutorial >WordPress >WordPress Hybrid Client: WordPress Powered iOS/Android Apps
Easy convert your WordPress website to iOS and Android apps! WordPress Hybrid Client (WPHC) is an open source project that allows you to create iOS and Android versions of WordPress websites for free. It is based on the Ionic SDK, Cordova and Crosswalk open source hybrid stack.
Main functions:
Example of project built with WPHC:
Installation:
Warning: This installation method is suitable for OS X and Linux systems. Currently, Windows systems are not supported.
First, you need to clone the project (no fork required):
<code class="language-bash">$ git clone https://github.com/shprink/wordpress-hybrid-client.git $ cd wordpress-hybrid-client $ git checkout v1.4.2 $ sh ./install.sh</code>
For more installation information, please refer to here.
Configuration:
After the installation is complete, you will find two configuration files in the project root directory:
config.json
: Application Configuration config.scss
: Style configuration Application Configuration (config.json
)
Most application behaviors can be configured through config.json
files, such as: title, API settings (baseUrl, timeout, maximum number of attempts), menu, cache, bookmark, article settings, syntax highlighting, classification, translation Settings, analysis, Cordova settings (status bar, application score, push notification), etc. For more information, please refer to here.
Style configuration (config.scss
)
You can override any Ionic or WPHC Sass variable. You can also add any specific style you want here. For more information, please refer to here.
Web Service:
Install and activate the WordPress pluginJSON REST API and modify the config.json
file:
<code class="language-json">"api": { "baseUrl": "http://YourDomain.com/wp-json" },</code>
Your web service can now be queried.
Push notification:
Install and activate the WordPress plugin Push Notifications for WP, and then modify the config.json
file as needed. If you do not want to enable push notifications, please "enabled": false
and skip this section.
<code class="language-bash">$ git clone https://github.com/shprink/wordpress-hybrid-client.git $ cd wordpress-hybrid-client $ git checkout v1.4.2 $ sh ./install.sh</code>
Please refer to here for details on push notification configuration for Android and iOS.
Development (Web) and build (native) parts, as well as publishing parts, please refer to the original text and modify the link according to actual conditions.
FAQs:
(Here, synonyms can be replaced and sentence structure adjustments can be made according to the FAQ part of the original text to keep the original meaning unchanged)
With the above steps, you can easily convert your WordPress website to iOS and Android apps. If you have any questions, please refer to the provided link for more information.
The above is the detailed content of WordPress Hybrid Client: WordPress Powered iOS/Android Apps. For more information, please follow other related articles on the PHP Chinese website!