$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>homepage - Possible to Alternate between Two Home pages?|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

homepage - Possible to Alternate between Two Home pages?

matteradmin7PV0评论

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.

Post a comment

comment list (0)

  1. No comments so far