• Resolved prcapitalgroup

    (@prcapitalgroup)


    I know the typical view data pulled for the top posts is 1 to 2 days. But I’ve been trying to determine code to extend that timeframe to about 30 days. I’ve had no luck with the research and trial and error so far. Does anyone know the proper code?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Anonymous User 3392934

    (@anonymized-3392934)

    Thank you for contacting us about modifying our Top Posts & Pages widget so that it includes 30 days worth of data.

    We have a helpful guide, complete with a code example, here.

    Please let us know if you have additional questions – we’re always happy to help! ??

    Thread Starter prcapitalgroup

    (@prcapitalgroup)

    Hello, thank you for the response. I tried the recommendation with the function plugin and code. I also used the code in the themes additional CSS. Both approaches netted no luck. I’m wondering if you can advise a next step.

    Plugin Contributor Jen H. (a11n)

    (@jenhooks)

    Hi @prcapitalgroup,

    Did you add the code below to your site using a plugin like Code Snippets?

    
    function jetpackme_top_posts_timeframe() {
        return '30';
    }
    add_filter( 'jetpack_top_posts_days', 'jetpackme_top_posts_timeframe' );
    

    If not, please do so, and let us know if you still have trouble.

    Thread Starter prcapitalgroup

    (@prcapitalgroup)

    Hello,

    I tried the code you recommended. That seems to have worked.

    I want to thank both of you for the help. It’s appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Top Posts Views Time Frame.’ is closed to new replies.