From 034c094923dea6c1f8e42b714a662660e9c974b3 Mon Sep 17 00:00:00 2001 From: Joshua Roy Date: Thu, 15 Feb 2018 15:41:08 -0500 Subject: [PATCH] Fixing programs page title --- uc-abroad.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/uc-abroad.php b/uc-abroad.php index ec2dd26..2707a25 100644 --- a/uc-abroad.php +++ b/uc-abroad.php @@ -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' ));