- This topic has 5 replies, 3 voices, and was last updated 1 year ago by
David.
-
AuthorPosts
-
March 22, 2020 at 1:55 pm #1206546
johnaps
Hello!
I have used gp hooks to implement a back to shop button on cart page, because previously i disabled header and footer on cart page so it will be in “focus mode”…
Problem is that i have used the following code only for cart page in the woocommerce_before_calculate_totals
<button class="rbs"> <a href="https://sofianos-orthopedika.gr/">Πίσω στο κατάστημα</a> </button> <style> .sfm-navicon-button.x.sf_label_default { display: none; } @media (max-width: 768px) { .rbs { width: -webkit-fill-available; } } .rbs { box-shadow: 0 0 1px 0 rgba(0,0,0,.1); border: 1px solid #ddd; transition: all 0.1s ease-in; border-radius: 8px!important; box-sizing: border-box; margin-bottom: 1.25em; } .rbs a { color: #ffffff; font-size: 16px; font-weight: bold; } </style>
and i have cleared cache and i get 2 buttons today for some reason (one where it should be up top, and one to bottom left which is weird…). This happened today, when i first implemented the hook the button was where it should be with and was just one in the entire page…
P.S. i have also used different hook positions after seeing the problem with no luck…In the following image you will see the 2 buttons (green is the good one, red is the bad/weird one)
March 22, 2020 at 4:16 pm #1206624Tom
Lead DeveloperLead DeveloperHi there,
If you set the Hook Element to “Draft”, do both buttons disappear?
If not, perhaps the other one is being added using a custom function or another Element?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentMarch 22, 2020 at 4:23 pm #1206630johnaps
They do disappear both if i make it draft
March 23, 2020 at 4:59 am #1207213David
StaffCustomer SupportHi there,
can you try this hook:
woocommerce_before_cart
And remove the Button element so this:
<button class="rbs"> <a href="https://sofianos-orthopedika.gr/">Πίσω στο κατάστημα</a> </button>
becomes:
<a class="rbs button" href="https://sofianos-orthopedika.gr/">Πίσω στο κατάστημα</a>
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 23, 2020 at 7:03 am #1207500johnaps
That did it David! Cant understand why though but you are awesome! Keep up the good work! Thank you!
March 24, 2020 at 1:44 am #1208115David
StaffCustomer SupportYou’re welcome.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.