Support » Plugin: Twitter posts to Blog » Set publish date as tweet date not import date

  • Resolved tjldesigns

    (@tjldesigns)


    Hello!

    Amazing plugin by they way!

    I just wondered is there a way to set the WordPress date of the post to the date/time of the tweet itself, rather than the date/time the tweet was imported? For older tweets being imported in this would be super useful.

    Also is there a way to stop retweets and replies from being included in the import completely?

    Thanks so much!!

    https://wordpress.org/plugins/twitter-posts-to-blog/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author badbreze

    (@badbreze)

    Just Relased 1.11.25

    Feel free to support the project

    http://www.divenock.com/projects/twitter-posts-to-blog

    Thanks so much – have just sent you a donation – it’s a pleasure to support your plugin.

    Yeah great plugin!

    Here’s the code I use to “stop replies from being included” (as far as I can tell the “Remove all @replies from posts” option just takes out the @usernames?)

    Basically I add this line to function dg_tw_iswhite($tweet) in twitter-posts-to-blog/functions.php:

    if (ord($tweet->text) == ord('@')) return false;

    so that it looks like this:

    function dg_tw_iswhite($tweet)
    {
        global $dg_tw_queryes, $dg_tw_publish, $dg_tw_tags, $dg_tw_cats, $dg_tw_ft, $wpdb;
    
        if (ord($tweet->text) == ord('@')) return false;

    [then the rest of function etc]

    …I guess you could combine it with the $dg_tw_ft[‘noreplies’] menu option, something like:

    if ($dg_tw_ft['noreplies'] && ord($tweet->text) == ord('@')) return false;

    – though I haven’t tested this. (The original code also seems to use an option called dg_tw_exclude_retweets but I couldn’t easily spot how that’s selected in the menus..?)

    Hello, the plugin author confirmed we can easily do this via the queries within the plugin, as below :

    from:useraccount -filter:retweets -filter:replies

    Works great 🙂

    Ah, that’s much easier, thanks very much!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Set publish date as tweet date not import date’ is closed to new replies.