Skip to content

Commit

Permalink
Remove custom page title with heading/subheading. Not allowed.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlxMedia committed Jul 20, 2018
1 parent cabcf28 commit d11aa1c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 31 deletions.
20 changes: 0 additions & 20 deletions functions.php
Expand Up @@ -351,26 +351,6 @@ function enspire_site_title() {
}


/* Page title
/* ------------------------------------ */
if ( ! function_exists( 'enspire_page_title' ) ) {

function enspire_page_title() {
global $post;

$heading = esc_attr( get_post_meta($post->ID,'_heading',true) );
$subheading = esc_attr( get_post_meta($post->ID,'_subheading',true) );
$title = $heading?$heading:the_title();
if($subheading) {
$title = $title.' <span>'.$subheading.'</span>';
}

return $title;
}

}


/* Blog title
/* ------------------------------------ */
if ( ! function_exists( 'enspire_blog_title' ) ) {
Expand Down
10 changes: 0 additions & 10 deletions functions/meta-boxes.php
Expand Up @@ -24,16 +24,6 @@ function enspire_get_meta_box( $meta_boxes ) {
'priority' => 'high',
'autosave' => false,
'fields' => array(
array(
'id' => $prefix . 'heading',
'type' => 'text',
'name' => esc_html__( 'Heading', 'enspire' ),
),
array(
'id' => $prefix . 'subheading',
'type' => 'text',
'name' => esc_html__( 'Subheading', 'enspire' ),
),
array(
'id' => $prefix . 'sidebar_primary',
'name' => esc_html__( 'Primary Sidebar', 'enspire' ),
Expand Down
2 changes: 1 addition & 1 deletion inc/page-title.php
Expand Up @@ -12,7 +12,7 @@
</ul>

<?php elseif ( is_page() ): ?>
<h2><?php echo enspire_page_title(); ?></h2>
<h2><?php the_title(); ?></h2>

<?php elseif ( is_search() ): ?>
<h1>
Expand Down

0 comments on commit d11aa1c

Please sign in to comment.