• Resolved jeroslav

    (@jeroslav)


    Hello.

    Plugin is working fine, but I have a question regarding the human_time_diff of the imported posts.

    I am using the following code to display how much time ago the post has been published (for example: 5 mins ago)

    <?php echo esc_html( human_time_diff( get_the_time('U'), current_time('timestamp') ) ) . ' ago'; ?>

    In the WP Admin under Posts section I can see that the imported post from an RSS Feed source is 5 minutes ago. But on the front page it displays it adds 1 hour so the result of the human_time_diff function becomes 1 hour and 5 minutes instead of just 5 minutes.

    Can someone explain what could be the cause of this?

    • This topic was modified 6 years, 11 months ago by jeroslav.
    • This topic was modified 6 years, 11 months ago by jeroslav.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @jeroslav,

    Does this happen only on your current theme or on any other themes?

    Have you tried switching to a WordPress default theme or do the theme/plugins conflict test thoroughly?

    Thread Starter jeroslav

    (@jeroslav)

    Ok thank you for your reply. I will check if it works on the default theme and do the plugins conflict test.

    Is there a way to load a <link></link> element from the RSS Feed that is inside the <channel>element.

    So that, I could display the source’S URL like: https://www.cnn.com, or if there is a way to display just the source name: CNN. I know this could be done by author name and such, but I would like to know if there is any other way, or if I could make a WP_Query to the database to pull out such information.

    Thank you.

    • This reply was modified 6 years, 11 months ago by jeroslav.
    • This reply was modified 6 years, 11 months ago by jeroslav.

    Hi @jeroslav,

    Retrieving the <link> value from the feed’s channel would require some custom work.

    If you’re using our Feed to Post, there is a filter that can be used for that. You can still take a look at this filter and have some idea or come up with something from there.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Time Diff on Impored Posts from Feed Sources’ is closed to new replies.