Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename the 'section' template to 'category' #26

Merged
merged 1 commit into from
Mar 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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