Portfolio Ordering?

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4648
    jasonwehling
    Member

    I have the Agile WP theme installed, and I have the Portfolio displayed on the Home page (via default page section code). That all works fine. However, I want to control the order of the portfolio items in that page section. The Segment code doesn’t specify any option like that. I’ve also played with the publish dates to see if I could control it that way, but that doesn’t seem to have any effect.

    What can I do?

    Thanks.

    Jason

    #4674
    Raghavendra
    Moderator

    Are you sure the date was changed right? I did make the change on my local installation and online too and looks like the change is taking effect since the default ordering is date based. Can you post me a temp login to your site here as a private message? Thanks

    BTW, we did have ordering based on order attribute earlier but had to remove the same since it was forcing the users do some extra work. If date ordering does not meet your need, we need a simple one line code change to the page template you are using if you need complete control of the ordering. This will use order attribute part of portfolio item.

    #4693
    jasonwehling
    Member

    I think I’m doing it right. I’m going into the Portfolio section of the admin area, and clicking in to edit a Portfolio item from the list. There, I edit the “Published on” date. I’ve tried very old, and very recent. Neither seem to affect the order on the front page of the site, nor does it affect the order when displayed on the interior pages.

    Any sort of ordering will work — manual or date. It’s just that the date isn’t having an effect.

    Unfortunately, the web site is being developed behind a firewall with no outside access. However, I am very technical and can perform any action required, including updates to MySQL tables as needed. What’s the query and ORDER BY that you’re using for this function? What file does that live in?

    Thanks.

    #4710
    Raghavendra
    Moderator

    Change the

    new WP_Query(array(‘post_type’ => $post_type, ‘posts_per_page’ => $post_count))

    to

    new WP_Query(array(‘post_type’ => $post_type, ‘posts_per_page’ => $post_count, ‘order’ => ‘ASC’, ‘orderby’ => ‘menu_order’))

    Depending on the shortcode you are using, you need to change the code accordingly in the php files.

    For [show_portfolio] shortcode (which is probably right in your case if you are using the sample data) –

    Edit the line number 143 in the file framework/functions/portfolio-functions.php

    For shortcode [show_post_snippets] –

    Pls edit the line number 434 of the the file framework/functions/post-functions.php (this shortcode is a generic one for all post types).

    In both cases, you will need to change

     new WP_Query(array('post_type' => $post_type, 'posts_per_page' => $post_count))
    

    to

     new WP_Query(array('post_type' => $post_type, 'posts_per_page' => $post_count, 'order' => 'ASC', 'orderby' => 'menu_order'))
    

    Then you can specify the order in the order attribute that shows up in the portfolio edit page (they also show up when you do a quick edit in portfolio page). Even better, install the plugin

    http://wordpress.org/plugins/post-types-order/

    to make it lot faster/easier.

    If you need the order to take effect in independent portfolio pages too, pls make similar change to loop-portfolio.php file in the $args variable.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Agile Theme Support’ is closed to new topics and replies.