Skip to content

Commit

Permalink
Merge pull request #26 from UCF/section-to-category
Browse files Browse the repository at this point in the history
Rename the 'section' template to 'category'
  • Loading branch information
cadie authored Mar 27, 2019
2 parents 4d30de8 + a80acec commit 5843a1d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dev/acf-export.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
{
"param": "post_template",
"operator": "!=",
"value": "template-section.php"
"value": "template-category.php"
}
]
],
Expand Down
8 changes: 4 additions & 4 deletions includes/header-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ function today_get_header_type( $header_type, $obj ) {

if ( $post_type === 'post' ) {
$header_type = 'post';
} elseif ( $post_type === 'page' && $post_template === 'template-section.php' ) {
$header_type = 'section';
} elseif ( $post_type === 'page' && $post_template === 'template-category.php' ) {
$header_type = 'category';
}
}

Expand Down Expand Up @@ -50,8 +50,8 @@ function today_get_header_content_type( $content_type, $obj ) {

if ( $post_type === 'post' ) {
$content_type = 'post';
} elseif ( $post_type === 'page' && $post_template === 'template-section.php' ) {
$content_type = 'section';
} elseif ( $post_type === 'page' && $post_template === 'template-category.php' ) {
$content_type = 'category';
}
}

Expand Down
2 changes: 1 addition & 1 deletion template-section.php → template-category.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Template Name: Section
* Template Name: Category
* Template Post Type: page
*/
?>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Header template for the 'Section' page template
* Header template for the 'Category' page template
*/
?>

Expand Down
2 changes: 1 addition & 1 deletion template-parts/header_content-archive.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Header content template for the 'Section' page template
* Header content template for the archive pages
*/
?>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Header content template for the 'Section' page template
* Header content template for the 'Category' page template
*/
?>

Expand Down

0 comments on commit 5843a1d

Please sign in to comment.