Permalink
Browse files
Fixing programs page title
- Loading branch information
Showing
with
20 additions
and
0 deletions.
-
+20
−0
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' )); |
|
|