All Projects → aOrz → Wordpress Mobile Application

aOrz / Wordpress Mobile Application

Licence: mit
为wordpress 转 app(安卓/IOS)

Projects that are alternatives of or similar to Wordpress Mobile Application

Flutter Woocommerce App
WooCommerce App template that uses Flutter. Integrated to work with WooCommerce stores, connect and create an IOS and Android app from Flutter for IOS and Android
Stars: ✭ 161 (+22.9%)
Mutual labels:  wordpress, app
Wordpress Android
WordPress for Android
Stars: ✭ 2,601 (+1885.5%)
Mutual labels:  wordpress, app
Vuefront
VueFront Core. Turn your old-fashioned CMS website in to a SPA & PWA in 5 minutes
Stars: ✭ 316 (+141.22%)
Mutual labels:  wordpress, app
Android Cnblogs
🔥🔥 博客园Android端开源项目,界面简洁清新。
Stars: ✭ 127 (-3.05%)
Mutual labels:  app
Docker Compose Wordpress
An example Docker Compose setup for WordPress plugin or theme development.
Stars: ✭ 127 (-3.05%)
Mutual labels:  wordpress
Chirp
🐦 A cross platform twitter application
Stars: ✭ 129 (-1.53%)
Mutual labels:  app
Hot
Hot is macOS menu bar application that displays the CPU speed limit due to thermal issues.
Stars: ✭ 131 (+0%)
Mutual labels:  app
Wp Phptidy
Automatically format PHP code to meet the WordPress Coding Standards
Stars: ✭ 126 (-3.82%)
Mutual labels:  wordpress
Easy transfer
文件传输项目
Stars: ✭ 130 (-0.76%)
Mutual labels:  app
Electron Global
One Electron instance for multiple apps
Stars: ✭ 129 (-1.53%)
Mutual labels:  app
Awesome Wp Cli
A curated list of packages and resources for WP-CLI, the command-line interface for WordPress.
Stars: ✭ 129 (-1.53%)
Mutual labels:  wordpress
Woocommerce Coupon Links
A WordPress plugin to automatically apply WooCommerce coupon codes to the cart via a URL.
Stars: ✭ 127 (-3.05%)
Mutual labels:  wordpress
Primer
Primer is a powerful theme that brings clarity to your content in a fresh design. This is the parent for all themes in the GoDaddy Primer theme family.
Stars: ✭ 129 (-1.53%)
Mutual labels:  wordpress
Wordpress Operator
WordPress operator for Kubernetes
Stars: ✭ 127 (-3.05%)
Mutual labels:  wordpress
Wcvendors
The Marketplace plugin for WordPress and WooCommerce
Stars: ✭ 130 (-0.76%)
Mutual labels:  wordpress
Rizhuti
wordpress theme rizhuti V2.8 Happy Crack version
Stars: ✭ 127 (-3.05%)
Mutual labels:  wordpress
Halo Dream
halo-dream 一款wordpress博客小程序
Stars: ✭ 130 (-0.76%)
Mutual labels:  wordpress
Geoip Detect
Wordpress plugin "Geolocation IP Detection": Provides geographic information detected by an IP adress.
Stars: ✭ 127 (-3.05%)
Mutual labels:  wordpress
Notification
WordPress Notification plugin
Stars: ✭ 128 (-2.29%)
Mutual labels:  wordpress
Stikynotes
一个便捷的Windows桌面便利贴/A convenitent Windows Notes
Stars: ✭ 128 (-2.29%)
Mutual labels:  app

Wordpress-Mobile-Application

利用wordpress作为后台,构建App(安卓和IOS)

更新内容

2017.6.26: 文章列表页增加截图,兼容4.8

2016.10.24: 添加底部菜单栏

2016.10.02: 升级 vue 2.0 版本 2016.05.15:支持代码高亮,支持语言PHP,JS,CSS,Java等,代码格式<pre class="lang:js">code</pre><pre class="lang:js"><code>code<code></pre>,代码高亮使用了prismjs,做了一些修改,如有其它需求可修改此插件。

定制 APP

修改主题颜色

下载本项目代码,打开css/mystyle.css最后几行有注释声明可以修改颜色值,修改颜色值即可自定义主题颜色。

修改底部菜单

/js/app.js 中修改 nav_bar 数据可以修改底部菜单栏,其中 class 为图标样式,可选样式参考 所有图标


构建方法

  1. 安装wordpress

  2. wordpress安装 wordpress rest api (2.0版本及以上)

  3. 更改/js/app.js里面的name和菜单名称和对应的id(可在example.com/wp-json/wp/v2/categories查看)

  4. 下载安装Hbuilder,使用其在线打包功能,选择文件/打开目录(打开本项目代码目录),双击manifest.json设置app名称和id,修改app图标和启动图。

  5. 点击发行,发行为原生应用,设置好开发者证书,然后打包。

打包成功后会自动下载到本地目录,这样一个App就制作好了。

列表页增加图片

当前主题的functions.php下添加如下代码即可

// 添加缩略图
add_action( 'rest_api_init', 'add_thumbnail_to_JSON' );
function add_thumbnail_to_JSON() {
//Add featured image
register_rest_field( 'post',
    'featured_image_src', //NAME OF THE NEW FIELD TO BE ADDED - you can call this anything
    array(
        'get_callback'    => 'get_image_src',
        'update_callback' => null,
        'schema'          => null,
         )
    );
}

// 自动缩略图
function get_image_src( $object, $field_name, $request ) {
  $first_img = '';
  $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $object['content']['rendered'], $matches);
  $first_img = $matches [1] [0];

  if(empty($first_img)){
    // echo get_bloginfo ( 'stylesheet_directory' );
    // echo '/img/default.jpg';
    $first_img = 'https://wx2.sinaimg.cn/crop.0.60.600.450.240/bc1249d0gy1fpcnyjbd38j20go0go0ta.jpg';
  }
    return $first_img;
}

案例体验

我的博客:奋斗的承诺

用到的技术

  1. html5+:http://www.html5plus.org/doc/h5p.html

  2. mui:http://dev.dcloud.net.cn/mui/

  3. hbuilder:http://www.dcloud.io/

项目截图

分享交流

打赏 加小助手进微信群

##License

The MIT License (MIT)

Copyright (c) 2016 Zhen.Wang

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].