Home page "featured listing" seems to be static

Discussion in 'Technical Support' started by karenc, Jul 4, 2011.

  1. karenc New Member

    v4.2.3 Developer

    Purplicous

    Hi,

    I can't figure out how to get the featured listings to rotate. Help? Thanks, Karen
  2. seymourjames All Hands On Deck

    What piece of code are you using to make the featured listings?
  3. seymourjames All Hands On Deck

    Not sure the standard one does that directly without modifying the plugin itself.

    /**
    * This function is useful for generating a horizontal table of featured listings.
    *
    * Here is a list of available parameters:
    * - number = integer The number of listings to return
    * - cols = number of columns
    * - rows = number of rows
    * - table_attr = table attributes
    * - tr_attr = table row attributes (arrays are cycled)
    * - td_attr = table cell attributes (arrays are cycled)
    * - trailpad = value to pad trailing cells with
    * - vdir = vertical direction (default: "down", means top-to-bottom)
    * - hdir = horizontal direction (default: "right", means left-to-right)
    * - show_price = string Y or N
    *
    */
  4. Mike-N-Tosh Developer & Moderator

    By default the plugin call code is this:
    PHP:
    {feature_listings_horizontal number=8 cols=4 table_attr='width="100%" cellpadding="3" cellspacing="3"' td_attr='' order_by='dateadded' order='desc'}
    Notice the last 2 parameters are "order_by" and "order". That is what creates the sorting of the listings it finds during the db table query. (e.g. sort the listings by the "dateadded" column in a descending order. [newest first])

    Just delete those last 2 parameters and the plugin should default to sort by "rand()" which will get random listings based on all the other criteria and limited to the number chosen (or 4 by default).
  5. seymourjames All Hands On Deck

    So it does.

    Not sure it used to do that. Things must change.
  6. Mike-N-Tosh Developer & Moderator

    That would be correct, it has changed. I believe in 4.2 and again in either 4.2.1, .2 or .3. LOL Many of the default plugins have changed, since 4.2.0.

    You can also use more parameters then listed (apparently the commented header hadn't been updated).
  7. seymourjames All Hands On Deck

    I thought so. Not senile yet then.
  8. Mike-N-Tosh Developer & Moderator

    Well...

    I can't really comment on that part.
  9. karenc New Member

    Hi - Thanks for all the feedback. I know nothing about code, but will share this with Joel. I'm sure he'll understand what needs to be done based on your replies.

    Happy July 4th!

    Karen

Share This Page