WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WP_Query not rand with tax_query only on Multisite? (4 posts)

  1. Gregoire Noyelle
    Member
    Posted 2 years ago #

    Hi
    I have a problem with WP_Query don't rand with tax_query.
    Here is the loop on pastie

    It concerne this part of the page (please see screenshoot here)

    It works on the site test (WP Single) and not on the real website (WP Multisite).

    1 year ago, Andrew Nacin says: "It looks like random doesn't work with tax_query". It seems to only not work on Multisite now.

    Could you help me?

    Thanks a lot
    Grégoire

  2. Gregoire Noyelle
    Member
    Posted 2 years ago #

    Here is the link about the post I was talking about with Andrew Nacin

  3. Gregoire Noyelle
    Member
    Posted 2 years ago #

    the only solution I find on the MU website is to use PHP function "shuffle"
    Here is the code on pastie.
    I really hope to find a more "WordPress" solution.
    Anny idea?
    Thanks

  4. Gregoire Noyelle
    Member
    Posted 2 years ago #

    I find the solution. That's a hosting set up!!
    This one limit the random query and you have to active it with a special set up.
    The same compagny recommand to cache these kind of query. I find an article about that

Topic Closed

This topic has been closed to new replies.

About this Topic