WordPress.org

Ready to get started?Download WordPress

Forums

Tweetable
Removing Tweetable from private posts (5 posts)

  1. omegadm
    Member
    Posted 4 years ago #

    Private posts are also showing the retweet button. This obviously does not make sense as anyone clicking the tweeted link who is not logged in to my blog will get a 404 error page.

    Is there a way to prevent the retweet button being added to private posts?

    Best regards, Brian

  2. omegadm
    Member
    Posted 4 years ago #

    Solved this... Modify line 228 of tweetable.php

    from:
    if (is_single() && $installed) {
    to:
    if (is_single() && $installed && $post->post_status == 'private') {

  3. omegadm
    Member
    Posted 4 years ago #

    Apologies slight typo (should be !=) i.e.

    if (is_single() && $installed && $post->post_status != 'private') {

  4. omegadm
    Member
    Posted 4 years ago #

    Actually I am wrong. After properly testing (too many windows open!) I cannot get this to work.

    Any input greatly appreciated.

  5. omegadm
    Member
    Posted 4 years ago #

    OK, finally I got it...

    after line 225:
    $installed = get_option('tweetable_account_activated');
    Add:
    $post = get_post($post_id);

    The add the if statement as per above. My php id getting rusty...!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags