
Progressive Web Apps Support Coming To WP-AppKit
We are in the process to add Progressive Web Apps support to WP-AppKit. And guess what? You can test this new feature right now.
We are in the process to add Progressive Web Apps support to WP-AppKit. And guess what? You can test this new feature right now.
By default, WP-AppKit allows to have post list as homescreen but sometimes we need more. Boost your skills by Learning to create a customized homescreen for your app.
Post List components query can be customized using the wpak_posts_list_query_args filter hook. Internally, WP-AppKit Post List components’ queries are WP_Query objects. So basically, all customization that can be done on WP_Query objects…
Tips and best practices to develop and distribute the next versions of your app when using WP-AppKit.
Category To define a custom template (archive-my-category.html) for a given category (slug my-category):
1 2 3 4 5 6 7 |
//In your WP-AppKit theme's functions.js App.filter( 'template', function( template, current_screen ) { if ( TemplateTags.isCategory( 'my-category', current_screen ) ) { template = 'archive-my-category'; //Don't need .html here. } return template; } ); |
Custom Post Type To define a custom single template (single-my-post-type.html) for a given post type (post…
Each template has a pre-defined set of variables passed to it by core. You can also pass your own custom params (variables or functions) to templates by using the template-args…
Add comment’s author email
1 2 3 4 5 6 7 8 |
//In a php file created in your WP-AppKit theme's "php" folder: function add_comment_author_email( $comment_data, $comment_data_raw, $post_id ) { $comment_data['author_email'] = $comment_data_raw['comment_author_email']; return $comment_data; } add_filter( 'wpak_comments_data', 'add_comment_author_email', 10, 3 ); |
Then in your comments.html template:
1 2 3 |
<p> My author email: <%= comment.author_email %> </p> |
Add comment’s parent ID
1 2 3 4 5 6 7 8 |
//In a php file created in your WP-AppKit theme's "php" folder: function add_comment_parent_id( $comment_data, $comment_data_raw, $post_id ) { $comment_data['parent_id'] = $comment_data_raw['comment_parent']; return $comment_data; } add_filter( 'wpak_comments_data', 'add_comment_parent_id', 10, 3 ); |
To Know More Here is the section of the doc concerning the comments.html template
A tutorial on how to get touch and swipe enabled WordPress galleries in your WP-AppKit powered mobile apps with PhotoSwipe.
Use the PhotoSwipe Javascript library in your WP-AppKit theme to let users zoom images by pinching in and out.
Learn how to add custom templates and render custom data in your app’s theme