I want to create a WordPress plugin that allows me to do A/B testing for WordPress standard posts, but I can't use the Shrimptest plugin because I need a spin: Since I'm ultimately testing shareability on social networks, I want each of my variant posts to have unique URLs.

So: How can I create three posts (each with its unique URL) and then rotate their appearance on the frontend?

But I'm not even sure if this is technically possible. Any tips on how to get started?

I've also looked at the WordPress Headline Split Tester (http://wordpress.org/extend/plugins/headline-split-tester/), but again I'm not sure if whomever clicks on their friends' shared Headline A will also go to the post with the same Headline.

I've also looked at the Premise plugin, but they seem to support landing pages only -- not posts.

Thanks in advance for any tips/suggestions.


You can use ShrimpTest for this. Basically, you need to reverse the test idea. You're making three separate posts, one of which will be displayed on the front page. That means that two others will not be displayed on the front page. So you're doing an exclusion.

Say your three posts have id's of 101, 102, and 103. You'd set up a test and use the manual PHP mode. Then in your index.php file (or whatever is displaying on your homepage), you'd do this:

$variant = shrimptest_get_variant( 1 ); // this will be the test number
switch ( $variant ) {
  case 0:
    $exclude = array(102,103); // show post 101
  case 1:
    $exclude = array(101,103); // show post 102
    $exclude = array(101,102); // show post 103

Then something like query_posts(array('exclude'=>$exclude)) or similar to modify your main query. You don't really explain in your question how you're showing these, so I can't be sure of this part.

ShrimpTest is generic. It can test anything. You just have to write the code for what you're testing yourself.

| improve this answer | |
  • Thank you very much for your response, Otto. I don't just want to test the index.php/front page, though -- I'd like the ability to display variations for every individual post page. Should – Linda Aug 21 '11 at 3:33
  • ... E.g if a visitor shares a link to www.mysite.com/second-post-article-version-a-headline, the next person to visit the single post will also see version-a-headline. I think I understand what you're saying about the front page, but I'm not sure how to exclude variations on a single-post.php when the post will vary every time. (And please forgive me if I'm missing something. I'm new to plugin development, as you can probably tell.) – Linda Aug 21 '11 at 3:40

Already available: Shrimptest

| improve this answer | |
  • I already got in touch with the creator of Shrimptest, and found that his plugin isn't what I'm looking for because it does not offer unique URLs. (I ultimately want to measure shareability of different posts, which is why I don't want readers viewing a different headline than what they saw on Twitter or Facebook after they click on a link). Thanks for leaving a comment though. – Linda Aug 19 '11 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.