ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Random future entries

August 11, 2010 5:55am

Subscribe [3]
  • #1 / Aug 11, 2010 5:55am

    24here

    69 posts

    Hello,
    Could some body tell how to make work this code:

    {exp:weblog:entries weblog="news|actual|official" limit="1" orderby="random" show_future_entries="yes" sticky="off" disable="member_data|trackbacks|pagination"}

    But this code shows one random entry from all entries on the site


    I need to show one random entry of future entries.

  • #2 / Aug 11, 2010 8:37am

    Sue Crocker

    26054 posts

    Have you seen: http://expressionengine.com/legacy_docs/modules/weblog/parameters.html#par_start_on

    You’d use the start_on parameter like this:

    start_on="{current_time format='%Y-%m-%d 00:01'}"

    See how I changed the current_time to use 00:01? This way you get entries that are for that day as well.

    Does that help?

  • #3 / Aug 11, 2010 11:46am

    24here

    69 posts

    That didn’t help, because shows also today entries

  • #4 / Aug 11, 2010 12:26pm

    Rob Allen

    3114 posts

    try changing the time from 00:01 to 23:59

  • #5 / Aug 11, 2010 1:21pm

    24here

    69 posts

    bluedreamer, It seems like it works. Thanks

  • #6 / Aug 11, 2010 3:12pm

    Ingmar

    29245 posts

    Glad to see you found a solution. Please post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases