Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Created January 24, 2019 12:11
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save andrewlimaza/45c4739734c34666e782d032a1368f3e to your computer and use it in GitHub Desktop.
Save andrewlimaza/45c4739734c34666e782d032a1368f3e to your computer and use it in GitHub Desktop.
Load content on confirmation or checkout page for PMPro.
<?php
/**
* Load content for specific pages, checkout or confirmation page
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function load_my_script_for_pmpro() {
global $pmpro_pages;
if ( is_page( $pmpro_pages['checkout'] ) || is_page( $pmpro_pages['confirmation'] ) ) {
?>
<!-- script or styles go here -->
<?php
}
}
add_action( 'wp_head', 'load_my_script_for_pmpro' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment