Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MaximilianoRicoTabo/0316d02898404fc6e9a1fbafee29c722 to your computer and use it in GitHub Desktop.
Save MaximilianoRicoTabo/0316d02898404fc6e9a1fbafee29c722 to your computer and use it in GitHub Desktop.
Load custom CSS for Membership Checkout page - Paid Memberships Pro
<?php
/**
* Load custom CSS on checkout page in Paid Memberships Pro.
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function load_css_for_level_checkout(){
global $pmpro_pages;
// Change your membership level ID here.
if ( is_page( $pmpro_pages['checkout'] ) ) {
?>
/* Add Custom CSS below */
<style type="text/css">
form.pmpro_form .pmpro_checkout-fields div.pmpro_checkout-field {
display: inline-block;
with:49%;
}
</style>
<?php
}
}
add_action( 'wp_footer', 'load_css_for_level_checkout', 10 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment