Jump to content
Sign in to follow this  
danoah

How do I randomize soapboxes and boxes?

Recommended Posts

danoah

Hello, how do I randomize soabbox sets and box sets? I have ten boxes in the set, but it only pulls up the last two (I have it set to two max). I want it to always put two random boxes into those spots. Is this possible? Thanks! Dan

Share this post


Link to post
Share on other sites
Kate

HI Dan, I'm sure you could do it by modifying that section. You would have to modify the query_posts call to use "orderby=rand". Are you familiar with PHP and/or modifying sections? I haven't tried it, but I wouldn't see why it wouldn't work. Here's some additional info on random posts: http://wordpress.org/support/topic/how-to-get-random-post The other option is to use a plugin that can query custom post types. Then you could place the shortcode inside of the box.

Share this post


Link to post
Share on other sites
danoah

Hey Kate, thanks for the info! I have no idea how PHP works or where I'd edit that. What file would that be?

Share this post


Link to post
Share on other sites
kastelic

I do know that in section.boxes.php on line 239 you can change it from "id" to "rand" but I don't know how to filter or override that function in the child theme. Changing core files in not recommended so use this method at your own risk.

Share this post


Link to post
Share on other sites
danoah

I see. I think it would only be helpful to me in child themes as I don't want it to always be random.

Share this post


Link to post
Share on other sites
catrina

If you have PlatformBase, please make sure it's activated and copy that file into the platformbase folder so you can edit it accordingly.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×