Skip to content
This repository has been archived by the owner. It is now read-only.

Fixing programs page title #5

Merged
merged 1 commit into from Feb 15, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions uc-abroad.php
Expand Up @@ -129,8 +129,28 @@ function program_archive_page_template( $archive_template ) {
}
return $archive_template;
}

add_filter( 'archive_template', 'program_archive_page_template' );

//Modify title
add_filter( 'pre_get_document_title', 'abroad_title', 50);
add_filter( 'wds_title', 'abroad_title', 50);

function abroad_title( $title ) {
//echo $title; exit;
if ( is_post_type_archive('program') ) {
$title = 'Programs | '.get_bloginfo( 'name' );
}
return $title;
}

//Add title tag theme support
add_action( 'after_setup_theme', 'graduateschool_title_tag' );
function graduateschool_title_tag() {

add_theme_support( 'title-tag' );
}


function abroad_scripts() {
wp_enqueue_script( 'abroad-js', plugin_dir_url( __FILE__ ) . '/abroad.js', array( 'jquery' ));
Expand Down