If you want to add any shortcode for posts on your androapp mobile app than you can do so by adding below code in your themes functions.php
add_filter( 'json_prepare_post','androapp_overwrite_content', 11, 3 ); function androapp_overwrite_content($data, $post_array, $context) { $textToBeAdded = do_shortcode("[related_post_shortcode]"); $data['pwapp_post_content'] = $data['pwapp_post_content'].$textToBeAdded; return $data; }
If you want to use post id or some other information you can use $post and $data objects, see below example to use post id
Continue reading “How to Add Shortcode in AndroApp Post Page”