Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #1277


    I’m looking for a way to order the 5 posts in the featured category. The best way would be if ordered by the “get_the_modified_time()” function.

    I found it here (Purchase code hidden if logged out)(Purchase code hidden if logged out) /, but I don’t know, how to implement it to index.php.

    If this would work, every post, assigned to featured category would automaticaly “jump” to the first (left) place.

    Can you please help me with that?


    As far as I know you can achieve what you want by changing the loop order. Open index.php – you’ll find following code there:

    $additional_loop = new WP_Query("cat=".$k_option['mainpage']['feature_cats_final']."&posts_per_page=".$k_option['mainpage']['feature_count']);

    According to this page there’s the possibility to order “by modification date” by using orderby=modified

    So replace the code above with:

    $additional_loop = new WP_Query("cat=".$k_option['mainpage']['feature_cats_final']."&orderby=modified&posts_per_page=".$k_option['mainpage']['feature_count']);

    The Dude

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Featured posts – ordered by "last modified" date?’ is closed to new replies.