AP_QA_Query_Hooks::loop_start( WP_Query $query )
Description #
Make sure single question loop render AnsPress shortcode.
Parameters #
- $queryWP_Query (Required) Query loop.
Source #
File: includes/qaquery-hooks.php
public static function loop_start( $query ) { if ( $query->is_main_query() && $query->is_single() && 'question' === get_query_var( 'post_type' ) ) { $query->posts[0]->post_content = '[anspress]'; } }
Expand full source code Collapse full source code View on GitHub: includes/qaquery-hooks.php:229
Add your comment