Title: Changing button location
Last modified: June 7, 2018

---

# Changing button location

 *  Resolved [osherezra3363](https://wordpress.org/support/users/osherezra3363/)
 * (@osherezra3363)
 * [8 years ago](https://wordpress.org/support/topic/changing-button-location-2/)
 * Hey guys, Thanks in advance to all.
 * I was wondering if there is a way to change the location of the paypal button
   in the `single product page` ?
 * currently it’s under the `Add to cart` button and I want it next to it.
    ** I
   tried to find the `Php` template file, but couldn’t, also didn’t didn’t find 
   any `actions` `filters` referring to this. hope you guys could give a hint or
   two cheers to all 🙂
 * [issue pic](https://imgur.com/a/IMbgtjf)
    -  This topic was modified 8 years ago by [osherezra3363](https://wordpress.org/support/users/osherezra3363/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [melinda a11n](https://wordpress.org/support/users/melindahelt/)
 * (@melindahelt)
 * Automattic Happiness Engineer
 * [8 years ago](https://wordpress.org/support/topic/changing-button-location-2/#post-10375767)
 * Right now, the button is hooked in to woocommerce_after_add_to_cart_form.
 * You could unhook it and then hook it into an earlier action to move it on the
   page.
 *  Thread Starter [osherezra3363](https://wordpress.org/support/users/osherezra3363/)
 * (@osherezra3363)
 * [8 years ago](https://wordpress.org/support/topic/changing-button-location-2/#post-10375799)
 * Hey Melinda thanks for the help,
    so basically what I need to do is add a filter
   function to `function.php`,
 * can you give me an example on what do you mean by `un-hooking` ?
    Cheers 🙂
 *  Plugin Contributor [Thomas Shellberg](https://wordpress.org/support/users/shellbeezy/)
 * (@shellbeezy)
 * Automattic Happiness Engineer
 * [8 years ago](https://wordpress.org/support/topic/changing-button-location-2/#post-10378828)
 * [@osherezra3363](https://wordpress.org/support/users/osherezra3363/) – this is
   not done with a filter but rather by using remove_action.
 * This tutorial goes over the idea:
 * [https://wpbackoffice.com/reorder-product-page-contents-woocommerce/](https://wpbackoffice.com/reorder-product-page-contents-woocommerce/)
 * I’m not sure that you can easily render the button right next to the ‘Add to 
   Cart’ button, it certainly wouldn’t be as simple as a CSS rule to make it `float:
   right;`. The reason is because the ‘Add to Cart’ button is part of a `<form>`
   element.
 * Hope that helps!
 *  Thread Starter [osherezra3363](https://wordpress.org/support/users/osherezra3363/)
 * (@osherezra3363)
 * [8 years ago](https://wordpress.org/support/topic/changing-button-location-2/#post-10379107)
 * [@shellbeezy](https://wordpress.org/support/users/shellbeezy/) thanks man I’l
   check it out and update below =====>
 * **update:** well it seems to be that the button is under the `<form>` parent 
   so i’v decided to use flex-box to get the job done. all works fine and looks 
   great, just one issue. it seems that all the changes I make in chrome dev tools
   appear, but when it gets to the theme css file it doesnt work, Iv tried adding`!
   important` to the changes and purge `cache`, but still no luck 🙁 any idea what’s
   causing this ?
 * cheers,
    -  This reply was modified 8 years ago by [osherezra3363](https://wordpress.org/support/users/osherezra3363/).
    -  This reply was modified 8 years ago by [osherezra3363](https://wordpress.org/support/users/osherezra3363/).
    -  This reply was modified 8 years ago by [osherezra3363](https://wordpress.org/support/users/osherezra3363/).
    -  This reply was modified 8 years ago by [osherezra3363](https://wordpress.org/support/users/osherezra3363/).
 *  [Will Brubaker](https://wordpress.org/support/users/willthewebmechanic/)
 * (@willthewebmechanic)
 * Automattic Happiness Engineer
 * [8 years ago](https://wordpress.org/support/topic/changing-button-location-2/#post-10384159)
 * Since you seem to be familiar with the chrome dev tools, can you see the changes
   that you have made to the theme CSS in the inspector?
 * Have you tried to use the customizer to insert your custom CSS rather than the
   theme’s CSS file?

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Changing button location’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/woocommerce-gateway-paypal-express-
   checkout_b298d1.svg)
 * [WooCommerce PayPal Checkout Payment Gateway](https://wordpress.org/plugins/woocommerce-gateway-paypal-express-checkout/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-gateway-paypal-express-checkout/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-gateway-paypal-express-checkout/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-gateway-paypal-express-checkout/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-gateway-paypal-express-checkout/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-gateway-paypal-express-checkout/reviews/)

## Tags

 * [paypal](https://wordpress.org/support/topic-tag/paypal/)

 * 5 replies
 * 4 participants
 * Last reply from: [Will Brubaker](https://wordpress.org/support/users/willthewebmechanic/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/changing-button-location-2/#post-10384159)
 * Status: resolved