• Resolved David31650

    (@david31650)


    Hi – I just installed Simple Blog Stats, so maybe I’m doing something wrong. The shortcode [sbs_updated] does not appear to work correctly on my site : an a private post dated 2020-12-09 it is displaying the date of last update 2 days earlier : 2020-12-07. The time is also wrong.

    When the post status was changed to public, it worked OK. As it does in this post on our our development site : https://activites-canines.com/_dev/test-blog-stats/

    But on a page I just published (linked above), again the wrong date and time. The same incorrect date and time is given on the settings page pf SBS.

    What am I missing?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Thanks for reporting. This looks like a bug. Will investigate further and try to resolve for the next plugin update.

    Plugin Author Jeff Starr

    (@specialk)

    Just to follow up with this. The reported behavior is correct, as the [sbs_updated] shortcode is looking only at posts with “publish” post status.

    As of the next version of the plugin, it is possible to customize the post status for the [sbs_updated] shortcode. To do so, add the following code to your theme (or child theme’s) functions.php file (or add via simple custom plugin):

    function sbs_updated_post_status($status) { return 'publish,draft,pending'; }
    add_filter('sbs_updated_post_status', 'sbs_updated_post_status');

    Notice where it says publish,draft,pending, that determines which post statuses are included. You can change/edit as needed.

    The next version of SBS is 20210210, should be available later today. Thanks again for reporting, @david31650.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘sbs_updated gives incorrect date ?’ is closed to new replies.