how to give certain posts priority when displaying (custom post types)


A couple questions i hope you may be able to help out with.

1. I am trying to figure out a way i can have certain posts (or listings) automatically have a higher priority than others. For reference i am using a directory theme “Superlist” and am selling listings. For example, lets say we have 5 listing package types. (basic (free), bronze, silver, gold, platinum.) I would like to be able to have listings for those who sign up for say the platinum package appear above listings for those with the gold package, and whoever lists with the gold show above the silver, and so-on… (and be sure that all paid types show above the free packages by default)

2. Extending this a bit further, i am wondering how i could limit the number of images a user uploads based on the same packages above. (For example, Gold package has a limit of 10 images, Bronze with a limit of 5 images, etc.)

Note: I have a development version of the site at equinerising.ORG that is basically a clone of the actual site. We can play with the code here with no issues. I will open access through the admin panel so you can have a look. Please advise.

Thank you!


  • Patrick
    • Support Monkey

    Hi there Scott Kappler

    I just popped into your site to see if I could help out a bit here.

    Unfortunately, there are no CSS classes assigned to listings created by users on your various packages. That would have been too easy.

    So I believe that would be the first thing that would need to be done by one of the SLS wiz-kids. Basically a bit of jQuery to pull the package ID of the user, and add that as a CSS class to the listing container.

    Then add the listings for each plan to a stack of div containers, each with its own corresponding ID, on the homepage. The rest would simply be styling. :wink:

  • Scott Kappler
    • Design Lord, Child of Thor

    Hi Patrick,

    Thanks for the feedback!

    Well, that i definitely above my coding knowledge, i am just getting into learning this stuff. It is interesting though. I am curious though, if a user changed or upgraded / downgraded their “package” at a later time would the jQuery dynamically pick this up accordingly? (I assume it would but i don’t know enough about the functions..)

    Finally, could this entire functionality be packaged in a ‘plugin’ so it could be enabled / disabled if needed? (That would be fantastic if possible!)

    Thanks again, I am looking forward to the next steps – hopefully i will learn how to perform these things very soon as well.


  • Patrick
    • Support Monkey

    Hi again Scott Kappler

    I would think that if code can be created to grab the current package ID of the user who owns the listing, rather than the user who posted the listing, then that could update automagically if/when the user changes to a different package.

    And yes, custom code can certainly be packed as a standalone plugin, as long as any site-or domain-specific data that may be needed is adapted for each site/domain where you use it.

    And just a thought here though; have you tried contacting the theme authors about this idea? They may already have some kind of solution, or maybe even an extra plugin that can get this done for you.

  • Scott Kappler
    • Design Lord, Child of Thor

    Hi Patrick,

    That makes sense.

    I have talked with the developers of the theme and unfortunately they do not have nor plan to offer this specific functionality. They also apparently don’t have the time to work on it either.

    Just for clarification here, is this within your support scope to assist with writing this for me? I just want to be sure i am not wasting our time.. :slight_smile:



  • Patrick
    • Support Monkey

    Hi Scott Kappler

    It certainly is within the scope of the support we can offer you. But custom coding, as noted by Luís above, is really not a priority when it’s not critical to acceptable functionality of a plugin or site. So, while it will eventually be looked into, it can take quite some time I’m afraid.

    So you may want to also seek additional input in the meantime from other avenues like (members-only forum here at WPMU DEV)

    Lots of helpful folk hang out at & I often find really cool code solutions at stackexchange. :slight_smile:

  • Lindeni Mahlalela
    • Recruit

    Hello Scott Kappler.

    I hope you are doing great today. As I was doing going through some old threads I noticed that this one is still open and I was wondering if you still need help or not.

    I noticed we haven’t heard from you since my colleague, Patric, posted some links where you could find help. Did you try any of those platforms as yet? If you did, did you get all the help you needed or you still need help with this. We will be happy to know you got everything working, but in case you still need help then we are always more than willing to help you in any way possible.

    Please let us know if you still need help. I hope you enjoy the rest of your day.



Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.