Tagged: report button
I’ve already manually added the report button into the post single.php using:
<a href="#" data-item-id="<?php echo $postid; ?>" data-item-type="post" data-context="post" data-context-id="<?php echo $postid; ?>" class="bpmts-report-button">Report</a>
but I now have two report buttons, how can I hide the report button on the post that is generated by the plugin (without using css)?
Also how to manually add the report button for Custom Post Type posts?
- This topic was modified 2 years, 9 months ago by damland.
- Brajesh Singh on August 26, 2020 at 4:52 am #32738
Thank you for the question.
1. You can either use a shortcode like
or code like
echo bpmts_get_report_button( array( 'label' => 'Report button label', 'item_id' => get_the_ID(), // post id. 'item_type' => get_post_type(), // post type. 'context' => 'anything', 'context_id' => get_the_ID(),// anything 'link_class' => 'some-css-class', 'wrapper_class' => 'some-warpper-css-class', ));
To enable it for custom post type, Please make sure it is checked under Reportable type in the settings.
Currently, I was unable to find a good way for disabling button(other than disabling reportable type).
Please allow me 2 days to put an update for that.
You must be logged in to reply to this topic.