This topic has 4 replies, 3 voices, and was last updated 4 months, 1 weeks ago ago by Andrew Mitchell
Hi there dear support team,
Recently you helped me with cart popup bug, it seems that the current cart popup has a link to the checkout page that I edited as no follow no index, so I get many redirects.
Where can I find the cart checkout button to edit the attribute to add rel=”nofollow” ?
Thanks
Adding this script to my child theme functions.php is the right thing to do?
add_action(‘wp_footer’, ‘add_nofollow_to_checkout_button’);
function add_nofollow_to_checkout_button() {
if (is_cart()) {
?>
Hello scrumgum,
Thank you for getting in touch with us.
Please try to use the next code in functions.php of the child theme:
add_action('wp', function() {
remove_action( 'woocommerce_widget_shopping_cart_buttons', 'etheme_woocommerce_widget_shopping_cart_proceed_to_checkout', 20 );
add_action( 'woocommerce_widget_shopping_cart_buttons', 'etheme_child_woocommerce_widget_shopping_cart_proceed_to_checkout', 20 );
}, 70);
function etheme_child_woocommerce_widget_shopping_cart_proceed_to_checkout() {
echo '<a href="' . esc_url( wc_get_checkout_url() ) . '" class="button btn-checkout wc-forward" rel="nofollow">' . esc_html__( 'Checkout', 'xstore' ) . '</a>';
}
Warm Regards,
The 8Theme Team
Dear scrumgum,
We hope you’re reveling in the experience our theme brings! Your enthusiasm is what fuels our passion. Would you be so kind as to channel that energy into a 5-star rating on ThemeForest? Your feedback is the spark that lights our way!
Click here to spread the love: https://themeforest.net/downloads
Thank you for being an integral part of our journey!
Best Regards,
The 8Theme Team
The issue related to '‘blocking the checkout page result in 187 Pages has links to redirect 302’' has been successfully resolved, and the topic is now closed for further responses