homepage - Possible to Alternate between Two Home pages?

admin2025-06-03  2

is it possible to alternate between two homepages in Wordpress without messing up SEO or anything unforeseen? We want to create Home-old and Home-new for A/B testing purposes.

Thank you!

is it possible to alternate between two homepages in Wordpress without messing up SEO or anything unforeseen? We want to create Home-old and Home-new for A/B testing purposes.

Thank you!

Share Improve this question edited Jan 30, 2019 at 7:43 fuxia 107k39 gold badges255 silver badges461 bronze badges asked Jan 30, 2019 at 0:01 MarkMark 1
Add a comment  | 

2 Answers 2

Reset to default 1

Your question seems to conflict itself - you want to run A/B testing, but don't want to mess up your SEO? The point of running A/B testing is to compare which page performs better, so naturally there will be a difference in how each page performs - hopefully your new page variation performs better (which is why you created a new page right?)

To answer the question, you can either load different components onto your homepage using get_template_part:

if($ab_test_version == 'a') {
   get_template_part('template-parts/old-homepage-content');
} else {
   get_template_part('template-parts/new-homepage-content');
}

Or you can change the entire template using the template_include filter:

function ab_test_homepage($template) {
   // Set some sort of variable to divide users between A and B variations
   $which_test = 'b';

   if (is_front_page() && $which_test == 'b') {
      $new_template = locate_template(array('new-homepage.php'));
      if(!empty($new_template)) {
         return $new_template;
      }
   }
   return $template;
}

add_filter('template_include', 'ab_test_homepage', 99);

You of course want to add some sort of tracking and "goal" to measure the performance of both pages, but you can raise that in another question on the appropriate site.

It depends on what and how you are making these changes.

If you are changing the HTML, changing or moving elements around like headings, keys word, text, etc. than yes of course it can effect your SEO. Once Google re-indexing your site it could potentially effect SEO.

If you are just changing the look of the page through styles (CSS) of the page than this shouldn't effect your SEO.

It's a little unclear exactly what your doing, but in general that is what I would say.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748962744a315195.html

最新回复(0)