After submit comments select the current tab
i think the best solution is to add an get attribute, in this case we don’t need javascript like this: your single.php : <div id=”product-information”> <div id=”tabs” class=”htabs”> <a href=”https://wordpress.stackexchange.com/questions/115110/<?php the_permalink(); ?>&tab=description” class=”<?php echo !isset($_GET[‘tab’]) || ($_GET[‘tab’] == ‘description’) ? ‘selected’:”; ?>”>Description</a> <a href=”<?php the_permalink(); ?>&tab=comment” class=”<?php echo isset($_GET[‘tab’]) && ($_GET[‘tab’] == ‘comment’) ? ‘selected’:”; … Read more