Skip to content

Instantly share code, notes, and snippets.

View gist:0209e6133381b5718afc31b968c52f21
add_filter( 'wpseo_schema_person', 'example_change_person' );
function example_change_person( $data ) {
$user_id = ??;
// data
$author_avatar = get_avatar_url('john@doe.com');
$data['name'] = "John Doe";
$data['author']['name'] = "John Doe";
View Learndash course shortcode
add_action( 'init', 'ld_add_custom_shortcode' );
function ld_add_custom_shortcode() {
if( ???? ){
function show_courses(){
$content = '<h3>Try these courses</h3>';
$content .= do_shortcode( '[ld_course_list mycourses="not-enrolled"]');
return $content;