• Resolved wynlim

    (@wynlim)


    hi,
    it seems like sbs_updated is only showing the last updated time for published posts, wonder if it is possible to show the last updated time for pages/cpts as well? Thanks! ??

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

    (@specialk)

    Yes will add that feature next plugin update. Thanks for the feedback, @wynlim.

    Thread Starter wynlim

    (@wynlim)

    Thank you so much! ??

    Plugin Author Jeff Starr

    (@specialk)

    Just to follow up with this. The next version of SBS adds a filter hook to set the post type(s) for [sbs_updated]. By default, it’s just posts. To change that or add more post types:

    function sbs_updated_post_type($type) {
    	
    	return array('post', 'book'); // whatever post types
    	
    }
    add_filter('sbs_updated_post_type', 'sbs_updated_post_type');

    That code can be added via theme (or child theme) functions.php, or add via simple custom plugin. Thank you for the idea, @wynlim ??

    Thread Starter wynlim

    (@wynlim)

    @specialk thanks for the work! I just checked and it now works for my custom post types. ?? Just clarifying: it seems to show only the latest published post date and not the latest modified/updated date?

    Plugin Author Jeff Starr

    (@specialk)

    Yep it’s published status by default. As time allows, I will add another filter so you can customize the post status as needed. Thanks @wynlim.

    Plugin Author Jeff Starr

    (@specialk)

    Looks like there already is a filter hook to customize the post status. Here is an example of how to use:

    function sbs_updated_post_status($status) {
    	
    	return array('pending', 'draft', 'future'); // whatever post status
    	
    }
    add_filter('sbs_updated_post_status', 'sbs_updated_post_status');

    That code can be added via theme (or child theme) functions.php, or add via simple custom plugin. Thanks again @wynlim.

    • This reply was modified 2 years, 10 months ago by Jeff Starr.
    • This reply was modified 2 years, 10 months ago by Jeff Starr.
    • This reply was modified 2 years, 10 months ago by Jeff Starr.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘sbs_updated for edited pages?’ is closed to new replies.