Jump to content
Sign in to follow this  
style

How to Order Carousel Items?

Recommended Posts

style

Hello, I have my carousel pulling in posts, how can I set it up so that the carousel pulls in items in a specific order? I tried using PostMash to order the carousel but it didn't work. Any thoughts? Thanks!

Share this post


Link to post
Share on other sites
cmunns

By default it pulls in from most recent. How would you like it to pull in?

Share this post


Link to post
Share on other sites
thomastallaksen

I have the same problem. Since it pulls in form most recent, I thought I just could manipulate the post date, but it doesn't seem to work.

Share this post


Link to post
Share on other sites
Kate

Hi Thomas, Have you tried any of the plugins that give you a drag and drop way to reorder your posts?

Share this post


Link to post
Share on other sites
thomastallaksen

It jsut needed som time to readjust. Works now. Thanks.

Share this post


Link to post
Share on other sites
corbett

I would like to do the same thing. Carousel items are ordered by date, but I need them to be ordered by the menu_order field. I have already tried the drag/drop post order plugins but they mess up the order of the prev/next links for posts. Other ideas?

Share this post


Link to post
Share on other sites
corbett

OK, I figured out a way to make this work, but it's a hack at this point. Maybe you can let me know where to make this edit so it won't be overwritten by theme upgrades? To order the carousel items by the "menu_order" field, I edited the file platformpro/sections/carousel/section.carousel.php and replaced this line (130): $carousel_post_query .= '&category_name='.$carousel_post_id; with this: $carousel_post_query .= '&category_name='.$carousel_post_id.'&orderby=menu_order&order=asc';

Share this post


Link to post
Share on other sites
a9k3d

Ah I just replaced the same line. Here's the condensed version:

  1. You copy lines 85-151 from the latest section.carousel.php. (Basically from
    div
    to
    /div
    inside the function
    section_template()

    .

  2. Make a new blank file in the root of your theme called template.carousel.php
  3. Paste into your new template.carousel.php
  4. Customize it your way.

Share this post


Link to post
Share on other sites
corbett

Awesome Alan, thanks so much! I had read something like that somewhere, but couldn't get it to work exactly. This did the trick.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×