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

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixing programs title tag
  • Loading branch information
jmr06005 committed Feb 15, 2018
1 parent ac6eaf4 commit 7a23e16
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
18 changes: 18 additions & 0 deletions grandchild-functions.php
Expand Up @@ -584,6 +584,24 @@ function program_archive_page_template( $archive_template ) {
}
add_filter( 'archive_template', 'program_archive_page_template' );

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

function graduateschool_title( $title ) {
if ( is_post_type_archive('programs') ) {
$title = 'Degree & Certificate 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' );
}

//ACF Code
if( function_exists('acf_add_local_field_group') ):

Expand Down
1 change: 0 additions & 1 deletion templates/header.php
Expand Up @@ -16,7 +16,6 @@ include get_template_directory().'/inc/vars.php';
<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
Expand Down

0 comments on commit 7a23e16

Please sign in to comment.