Archived

This topic is now archived and is closed to further replies.

  • 0

How to randomise specific boxes?


Question

Posted · Report post

Hello,

 

I have recently set up my Doctor Who website at (http://thewhohub.co.uk). As you can see, on the homepage, I have a set of four boxes, three of which lead to category pages, the fourth being a kind of "featured post" box:

 

Screen-Shot-2013-04-14-at-12.04.00-780x3

 

What I'm struggling with is this: is it possible to have the first three boxes fixed on the homepage, with the fourth alternating randomly between different featured posts? For example, you could have a box leading to the latest episode review when you first load the page, but when you refresh the box is different. 

 

I'm currently using the Pagelines framework professional/personal edition. I'm also making use of the "pagemash" plugin to order these aforementioned boxes on the homepage.

 

Thanks in advance for your help.

 

Share this post


Link to post
Share on other sites

8 answers to this question

Posted · Report post

Hi,

 

Unfortunately, the Boxes section doesn't have the ability to randomise one specific box. You can use the "Random" order in the Boxes meta settings but this is for all boxes not individual boxes.

 

What I would recommend is contacting one of our Pros and see if they can assist.

 

http://www.pagelines.com/pros/

 

Also the PageMash plugin, has not been updated since 2009, therefore, I recommend you try to find an alternative. - http://wordpress.org/extend/plugins/pagemash/

1 person likes this

Share this post


Link to post
Share on other sites

Posted · Report post

I use "Allow PHP in Posts and Pages" WP plugin + the following code in a text widget. Works fine for me.

$myData ="https://yourwebsite/text-file-with-your-html-content-in-it.txt";
$myText = file("$myData");
$myTexts = rand(0, sizeof($myText)-1);
$myRandomText=$myText[$myTexts];
echo $myRandomText;
[/php]

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks Sgendry :-)

Share this post


Link to post
Share on other sites

Posted · Report post

Hi,

 

Unfortunately, the Boxes section doesn't have the ability to randomise one specific box. You can use the "Random" order in the Boxes meta settings but this is for all boxes not individual boxes.

 

What I would recommend is contacting one of our Pros and see if they can assist.

 

http://www.pagelines.com/pros/

 

Also the PageMash plugin, has not been updated since 2009, therefore, I recommend you try to find an alternative. - http://wordpress.org/extend/plugins/pagemash/

 

Ok. Thank you very much for your help - it's a shame it can't be done. I think I'll have the other feature boxes on standby and change their order from time to time instead.

 

Thanks again

Share this post


Link to post
Share on other sites

Posted · Report post

No problem.

FYI, there is this plugin which may help you, I haven't used it personally but I know some of our users do.

 

http://wordpress.org/extend/plugins/boxer/

Share this post


Link to post
Share on other sites

Posted · Report post

Hi, In addition to Danny's excellent suggestion about Boxer plugin, you may want to consider keeping the image for the 4th box static, then using a random content plugin that delivers content via shortcode, such as Special Recent Posts to deliver the content within the box.  I don't think that one delivers on refresh, but definitely can add the latest post of the day.  There are several random post plugins on WordPress.org.

Share this post


Link to post
Share on other sites

Posted · Report post

No problem.

FYI, there is this plugin which may help you, I haven't used it personally but I know some of our users do.

 

http://wordpress.org/extend/plugins/boxer/

 

Thanks for pointing it out, certainly looks like it could be useful!

Share this post


Link to post
Share on other sites

Posted · Report post

Hi, In addition to Danny's excellent suggestion about Boxer plugin, you may want to consider keeping the image for the 4th box static, then using a random content plugin that delivers content via shortcode, such as Special Recent Posts to deliver the content within the box.  I don't think that one delivers on refresh, but definitely can add the latest post of the day.  There are several random post plugins on WordPress.org.

 

Okay, I will try it - thanks for your help.

Share this post


Link to post
Share on other sites