-
AuthorPosts
-
November 8, 2018 at 10:13 pm #1031409
Hi,
I used the enfold demo shop to create my shop.
I wanted to add a buy button and read more button to the products in the product slider.
I found this previous thread that enabled me to add the buy button: https://kriesi.at/support/topic/add-add-to-cart-button-in-product-grid-product-slider/
But I would also like to add the ‘Read more’ button.Can you help me do this?
- This topic was modified 6 years ago by Camilla88.
November 8, 2018 at 10:18 pm #1031411Also I would like the buttons horizontally aligned. Right now one product has a shorter name, and so the buy button is too far up compared to the others. It would be amazing with some help for this too.
November 11, 2018 at 8:09 pm #1032293Hi Camilla88,
Looks like the website is in maintenance mode and we’ll need credentials to see the page. Can you please share those with us?
Best regards,
VictoriaNovember 15, 2018 at 11:43 pm #1034177This reply has been marked as private.November 17, 2018 at 5:56 am #1034646Hi,
Thanks for that, though the login details are not working. Please check and verify.
Best regards,
RikardNovember 19, 2018 at 10:45 am #1035106This reply has been marked as private.November 25, 2018 at 12:09 am #1037311Hi,
Sorry for the late reply, I took a look at your site but I didn’t see the “editor” option to add functions in your functions.php, so here are two functions that may work fore you, Try adding one or the other to the end of your functions.php file in Appearance > Editor:add_action('woocommerce_after_shop_loop_item', 'replace_add_to_cart' ); function replace_add_to_cart() { global $product; echo '<br><a class="button" href="' . esc_attr( $product->get_permalink() ) . '">' . __( "Read more" ) . '</a>';
or this one:
add_filter( 'woocommerce_loop_add_to_cart_link', 'replace_loop_add_to_cart_button', 10, 2 ); function replace_loop_add_to_cart_button( $button, $product ) { return '<a class="button" href="' . $product->get_permalink() . '">' . __( "Read more" ) . '</a>'; }
Please let us know if one of these works for you.
Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.