Forked from kimwhite/load-custom-css-level-pmpro.php
Last active
July 24, 2023 15:51
-
-
Save MaximilianoRicoTabo/0316d02898404fc6e9a1fbafee29c722 to your computer and use it in GitHub Desktop.
Load custom CSS for Membership Checkout page - Paid Memberships Pro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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