Support » Plugin: Simple Discography » Ordering fix for shortcode [sidi-discography order_by="release"]

  • Resolved John LeBlanc


    Aloha Sébastien!

    I just worked out a fix for albums displayed out-of-order using the [sidi-discography] and [sidi-discography order_by=”release”] shortcodes.

    To order WP_Query results using a numerical meta_value, use ‘order_by’=>’meta_value_num’ as of WordPress Version 2.8:

    Since SiDi saves album release date as UNIX time (seconds since epoch) within the ‘sidi-release’ post meta key, we need to use ‘order_by’=>’meta_value_num’ for the correct ordering.

    Using ”order_by’=>’meta_value’, sorting is alphabetical. Therefore, a meta_value of 63072000 (Jan 1, 1972) would be considered greater than 283996800 (Jan 1, 1979).

    The Fix

    Current SiDi_Shortcodes.php line 118:

    New SiDi_Shortcodes.php line 118:


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


    Hi John,

    First of all, thank you for your contribution.
    j’ai effectué la correction que tu m’avais signalé. tu la trouveras dans la versions 1.2.4 .


    Your turnaround time pushing the update is spectacular.
    Merci mille fois, Sébastien!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Ordering fix for shortcode [sidi-discography order_by="release"]’ is closed to new replies.