Recent Portfolio Widget

Home Forums WordPress Themes – Premium Sleeky Pro Recent Portfolio Widget

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #36057

    I would like to reverse the order of the portfolio posts displayed in the Sleeky Recent Portfolio widget. I changed the order (DESC to ASC) in the portfolio_shortcodes.php file, but that didn’t seem to do it. Where can I find the code to make this change?

    function style_portfolio_render($total) {
    $args1 = array(
    ‘posts_per_page’ => $total,
    ‘category’ => ”,
    ‘category_name’ => ”,
    ‘orderby’ => ‘post_date’,
    ‘order’ => ‘ASC’,
    ‘include’ => ”,
    ‘exclude’ => ”,
    ‘paged’ => $paged,
    ‘meta_key’ => ”,
    ‘meta_value’ => ”,
    ‘post_type’ => ‘style_portfolio’,
    ‘post_mime_type’ => ”,
    ‘post_parent’ => ”,
    ‘post_status’ => ‘publish’,
    ‘suppress_filters’ => true );

    $my_posts = get_posts( $args1 );


    I also added the order=asc to sleeky_latest_portfolio.php

    //echo do_shortcode(‘[portfolio columns=3 showposts=6]’);
    echo ‘</div>’;
    } else {
    echo do_shortcode(‘[portfolio order=asc columns=3 showposts= ‘.get_theme_mod( ‘sleeky_number_portfolio’, 6).’]’);
    echo ‘</div>’;

    Neither seem to change anything.

    • This topic was modified 7 years, 4 months ago by Ellen.
    Binaya D

    Hi Ellen,

    Thank you for contacting Styled Themes support team. To change the order of portfolio post of Sleeky Recent Portfolio widgets you need to do certain customization on sleeky_latest_portfolio.php[ site_folder\wp-content\themes\sleeky-pro\sleeky_includes\widgets\skeeky_latest_portfolio.php ]. There you need to change wp_query argument to something like this:

    $args = array( 'post_type' => 'portfolio', 'posts_per_page' => 6, 'paged' => $paged, 'order' => 'ASC' );

    Note: As this widgets file is not template file , you can’t customize on child theme . To customize on child theme you need to create another widgets. So you changes will not lost on theme update.

    Let us know how it will goes,



    Thanks Binaya, that worked great!

    Binaya D

    Hi Ellen,

    You are welcome, if you face any problem in future then please let us know. We are happy to help you.


Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.