• I recently activated a report post plugin called WP Report Post,

    Supposedly upon activation, there should be a report link / button showing up immediately after the

    Posted on October 4, 2019 by (author)

    at the top of each single post.

    But it didn’t show up on my posts. A thread to the plugin support page did not yield a solution.

    If you read the plugin page

    https://www.ads-software.com/plugins/wp-report-post/

    under USAGE, the plugin author explained how to add

    .report-post-link and .report-post-button

    I assume it meant to add these codes to the theme files, so I looked through the theme files and I’m guessing they should be added to the

    template parts / content single.php

    Is that correct?

    If correct, I can’t figure out exactly where and how to add those codes. Do you think you can help me with that, please?

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @thegreen

    You can add the code

    <a href="#" post-id="<?php echo $post->ID; ?>" class="report-post-link">Report Inappropriate Post</a>

    inside the tag <article></article> in the file content-single.php

    see my screenshot https://cl.ly/04ffc434ec86

    Regards.

    Thread Starter thegreen

    (@thegreen)

    Hi Long,

    Thank you so much for helping… didn’t know you replied until just now. I inserted the code to Line 11 as illustrated on your screenshot and the link did appear…thanks to you code. The position of the code was above the title of the single post, however, which makes it look kind of odd.

    I experimentally replaced it at the end of Line 13 so Line 13 ends up looking like this

    <div class="entry-meta"> <a href="#" post-id="<?php echo $post->ID; ?>" class="report-post-link">Report Inappropriate Post</a>

    I was expecting an output at the frontend something like this

    Posted on October 4, 2019 by (author) Report Link

    but instead it looked like this

    Report Link Posted on October 4, 2019 by (author)

    It was an acceptable position but I’m just wondering if placing code as such will break anything there in the single post and if there’s a way to make it look like this instead?

    Posted on October 4, 2019 by (author) Report Link

    Thank you so much for helping. I really appreciate that.

    I am bashing my head with this plug in. I have now done step by step what this article says, but, when you click the link nothing happens. I assume it’s the href=”#” that is the issue, but I don’t know what URI to put in there?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding report button / link to post / page’ is closed to new replies.