lifterlms_page_title( $echo = true )
Contents
Source Source
File: includes/llms.template.functions.php
function lifterlms_page_title( $echo = true ) { $page_title = ''; if ( is_search() ) { $page_title = sprintf( __( 'Search Results: “%s”', 'lifterlms' ), get_search_query() ); if ( get_query_var( 'paged' ) ) { $page_title .= sprintf( __( ' – Page %s', 'lifterlms' ), get_query_var( 'paged' ) ); } } elseif ( is_tax() ) { $page_title = single_term_title( '', false ); } elseif ( is_post_type_archive( 'course' ) ) { $page_title = get_the_title( llms_get_page_id( 'courses' ) ); } elseif ( is_post_type_archive( 'llms_membership' ) ) { $page_title = get_the_title( llms_get_page_id( 'memberships' ) ); } $page_title = apply_filters( 'lifterlms_page_title', $page_title ); if ( $echo ) { echo $page_title; } else { return $page_title; } }
Expand full source code Collapse full source code View on GitHub