• lbbjon

    (@lbbjon)


    Hello,

    I cannot seem to find a way to display content that has been recently published/updated.

    What I want to do is present two sections:
    – Recent updates
    – Most popular

    I have displayed the most popular content fine but cannot seem to display posts and pages that have been recently updated/published.

    This is the shortcode I have tried – [tptn_list how_old=7days exclude_post_ids=16]

    But this returns blank, despite publishing or updating content. Posts and Pages are checked in the settings.

    Any ideas?

    Thanks.

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

    (@ajay)

    Hi,

    how_old should just be 7 without the days

    Thread Starter lbbjon

    (@lbbjon)

    Hi Ajay,

    Unfortunately, this does not work either, see screenshots:
    FE – https://drive.google.com/file/d/1sT7Hwqs82lRznWDp_rn4VyRDF9NnpvpR/view?usp=sharing
    BE – https://drive.google.com/file/d/18GtGvfkLzyxjCniiil6pMu3WiN8n2lSE/view?usp=sharing

    I updated a page after applying the updated shortcode, but no luck. Am I doing something wrong?

    Are you able to perhaps replicate on your side?

    Many thanks,
    Jon.

    Plugin Author Ajay

    (@ajay)

    What is the second screenshot exactly? It says how_old=days -> it should be just how_old=7

    
    [tptn_list how_old="7" exclude_post_ids="16"]
    

    Note that this will only display the posts that were published in the last 7 days, which is what I understand what you want to achieve.

    Once this is there, one option to look at the query that is generated using Query Monitor plugin

    Thread Starter lbbjon

    (@lbbjon)

    I must have misread your reply. I thought you meant without the 7 XD

    It does sort of achieve my requirements, but does not include pages or posts that are updated (If already published).

    Query monitor looks useful. Will give it a whirl

    Plugin Author Ajay

    (@ajay)

    That’s correct on the “updated” point – it uses the post_date option – I’m not sure as to what would go into the code, at least yet.

    • This reply was modified 3 years, 12 months ago by Ajay.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Most recently published/updated content?’ is closed to new replies.