Tagged: report button
Hello,
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?
Thanks- This topic was modified 4 years, 2 months ago by damland.
Hi,
Thank you for the question.1. You can either use a shortcode like
[bpmts_report_button]
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.
Regards
Brajesh
You must be logged in to reply to this topic.