Order of Sponsors

Support Area Forums Progress Order of Sponsors

Tagged: , ,

Viewing 6 posts - 1 through 6 (of 6 total)
URL to the page in question:
  • Author
    Posts
  • #4461
    Ben Coleman
    Participant

    How can I change the order of the sponsors and staff? I tried using the “order” field, but it seems to have no effect. I also tried using several plugins; they affect the posts, but not the sort order of the sponsors. Should I be doing this by changing the post date, or is there a more elegant solution?

    Thanks mucho!

    #4472
    Bill Robbins
    Moderator

    In the theme editor, open up page-sponsor.php and look for this line:

    <?php $loop = new WP_Query( array( ‘post_type’ => ‘sponsor’, ‘posts_per_page’ => 50 ) ); ?>

    Edit it to be like this:

    Then save your changes. That should let the order number have an effect when using the sponsor page. The same thing will work for the staff page as well.

    You can also use a staff or sponsor group too. The ordering will work with an group archive without any edits.

    #4474
    Ben Coleman
    Participant

    Well, that works if there’s only one sponsor category, but if there are subcategories the subcategories still seem to be ordered by date.

    #4475
    Bill Robbins
    Moderator

    If you have multiple categories, you’ll probably be better off with adding the groups directly to your navigation instead of the page templates. They are geared to short and simple lists primarily.

    I haven’t tried ordering items across multiple groups before. It may not be possible to do that outside of the publish date.

    There is quite a bit you can do with the WP_Query class. The WordPress Codex has a detailed article about it. You can always write a custom query to bring the posts you’d like to have.

    #5795
    Brent Lucas
    Participant

    Bill;

    I don’t seem to have a “page-sponsor.php”.

    Any ideas?

    #5798
    Bill Robbins
    Moderator

    Brent,

    The Foundation theme is made just a bit differently and I just received a notification that you’ve opened up a thread over there so I’ll pick this there too.

    Bill

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Order of Sponsors’ is closed to new replies.