2 categories for one component

As explained here Post List components queries can be customized using the wpak_posts_list_query_args filter hook. Here’s how to define a component (slug my-component-slug) that gets posts from 2 categories (my-first-category-slug and my-second-category-slug)…

Read More

Customize Login Expiration Time

By default, the user connection is automatically maintained 3 days. After that time, user has to reconnect. You can use the wpak_auth_connection_expiration_time and wpak_auth_purge_time hooks to customize this expiration time in a…

Read More

Customize Post List Component’s Queries

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…

Read More

Custom Templates Based On Category Or Post Type

Category To define a custom template (archive-my-category.html) for a given category (slug my-category): //In your WP-AppKit theme’s functions.js App.filter( ‘template’, function( template, current_screen ) { if ( TemplateTags.isCategory( ‘my-category’, current_screen…

Read More

Custom Template Data

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…

Read More

Custom Comments Data

Add comment’s author email //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’,…

Read More

Custom Post Data

Post Metadata To add a meta (stored as a WordPress post meta, here a meta called pdf) to your post data (in a variable called pdf_url): <?php // In a PHP file…

Read More

Having questions?

FAQ | Tutorials | Documentation

Or

Contact Us