WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Promotion Slider] Slider in widget – random not working

[Resolved] [Plugin: Promotion Slider] Slider in widget – random not working

  • StevieG
    Participant

    @stevieg

    i am using the slider in a text widget and coded the following

    [promoslider width=”100%” height=”100%” category=”rooms” numberposts=”1″ start_on=”random”]

    The Slider options are also set to random but the display is always the first promotion; I’ve tested this by changing the sequence. Even more bizarrely, its the first promotion in just that category that gets displayed i.e. if I make a promotion the most recent and its in more than one category it doesn’t get displayed!

    Is there something strange happening because its just one promotion being selected?

    http://wordpress.org/extend/plugins/promotion-slider/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Micah Wood
    Participant

    @woodent

    How many promotions are in your ‘rooms’ category?

    StevieG
    Participant

    @stevieg

    There are three; one of which is in another category too.

    Plugin Author Micah Wood
    Participant

    @woodent

    Do you mind posting a link to where your slider is? I would like to take a look.

    StevieG
    Participant

    @stevieg

    http://www.threeshoesdorset.co.uk

    The main slider works fine and has promotions in home-promo, food,rooms,about and dorset categories.

    The widgets in the footer are food,rooms and dorset respectively. All are set to display just one promotion as in my initial post.

    Cheers

    Plugin Author Micah Wood
    Participant

    @woodent

    Ah… I didn’t catch that the first go round. You are limiting the results to one.

    So here is what is happening:

    1) The numberposts attribute ensures that only one result is returned.
    2) The start_on attribute being set to random ensures that a random image is displayed from the results that are returned.

    So basically you are selecting a single post and trying to randomize it. It is doing exactly what you are telling it to do, it just isn’t what you are expecting. You will actually need to adjust the query itself to be random so that you get a different single image every time.

    Take a look at the FAQ and do a search for the promoslider_query_by_id filter. That is the filter you would use to customize the query.

    StevieG
    Participant

    @stevieg

    Thanks Micah
    I hear what you say and have looked at the filter. I can’t say I understand exactly how to use it though:-)

    Will I be able to do this from within a text widget?

    Plugin Author Micah Wood
    Participant

    @woodent

    Unfortunately, there is no easy way to implement what you want without touching some code. I wasn’t thinking about this particular use case when I created the plugin, so I will be sure to address this in the upcoming release. In the future, you will be able to do this with the shortcode.

    If you want to mess with some code to get it working, just let me know and I can walk you through it.

    StevieG
    Participant

    @stevieg

    Never mind. It’s such a great plugin.

    I am sure a solution will present itself:-)

    Thanks again for looking into this for me.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] [Plugin: Promotion Slider] Slider in widget – random not working’ is closed to new replies.