Created
April 8, 2015 13:17
-
-
Save strangerstudios/0fb4a7256861fb16a71a to your computer and use it in GitHub Desktop.
Add level name to the_title() output on membership checkout page for SEO
This file contains 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
//add level name to the_title() output on membership checkout page for SEO | |
function my_pmpro_membership_checkout_page_title( $title, $id ) { | |
global $pmpro_pages; | |
if(!empty($pmpro_pages) && is_page($pmpro_pages['checkout']) && in_the_loop()) | |
{ | |
global $pmpro_level; | |
$title .= ": " . $pmpro_level->name; | |
} | |
return $title; | |
} | |
add_filter( 'the_title', 'my_pmpro_membership_checkout_page_title', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This recipe is included in the blog post on "Add Level Name to Membership Checkout Page Title for SEO" at Paid Memberships Pro here: https://www.paidmembershipspro.com/add-level-name-to-membership-checkout-page-title-for-seo/