• Valeria

    (@unprocioneinansia)


    Hi! I’m new to this forum and to wp in general ^^ I have an online magazine and I recently decided to move it on wp (before it was in html!!! O__O ). I have a premium theme. In few words every issue of the magazine is a category of “projects” (not posts), every single project is a piece of art by our contributors. I wanted to make an intuitive and random navigation through issues, so at the end of every single project I wanted 3 or 4 thumbnails of random projects from the same issue. The guys from the premium theme support can’t say nothing more than “replace that code with this:

    if ( '' !== $include_categories )
    		$args['tax_query'] = array(
    			array(
    				'taxonomy' => 'project_category',
    				'field' => 'id',
    				'terms' => array( $include_categories ),
    				'operator' => 'IN',
    				'orderby' => 'rand',
    			)
    		);

    and I was soooo happy but it’s not working. They can’t help anymore because customization is out of their services. I was desperate than I googled that “orderby rand” and found out that is an universal variable (??? is that correct?) from wp so I thought to post here ^^ I’ve seen other topics about this issue but they can’t help and I really don’t know anything of php, I am a photographer! ??

    Glad if someone would like to say his opinion about the problem and really hope to reciprocate with some photography tips ??

    Why isn’t working? Any ideas?

  • The topic ‘'orderby' => 'rand'? i really wish it would work :(’ is closed to new replies.