I just made a new category & a then a new sub category under
the parent I then made a post & put the post in both of them.
When I click on the post it’s showing up as a Category Archive:
this is a new post why is it showing up as a archive.
I’m using the NewsPublish 1.0 theme
The word “archive” is coming from your theme. Category pages use the archive template file unless a category template file exists in the theme.
The WordPress Template Hierarchy
How do I make a category template for my theme the them I’m using
is NewsPublish 1.0 here’s the list of my templates.
Templates
404 Template
(404.php)
Admin.php
(Admin.php)
Archives
(archive.php)
Comments
(comments.php)
Footer
(footer.php)
Header
(header.php)
Main Index Template
(index.php)
One column, no sidebar(s) Page Template
(onecolumn-page.php)
Page Template
(page.php)
Search Form
(searchform.php)
Search Results
(search.php)
Single Post
(single.php)
Themater.php
(Themater.php)
Theme Functions
(functions.php)
content-after.php
(content-after.php)
content-before.php
(content-before.php)
default-admin-options.php
(default-admin-options.php)
default-options.php
(default-options.php)
loop-page.php
(loop-page.php)
loop.php
(loop.php)
menu-primary.php
(menu-primary.php)
menu-secondary.php
(menu-secondary.php)
sidebar-primary.php
(sidebar-primary.php)
sidebar-secondary.php
(sidebar-secondary.php)
social-icons.php
(social-icons.php)
Styles
Stylesheet
(style.css)
pagenavi-css.css
(pagenavi-css.css)
rguy84
June 16, 2011, 2:10pm
4
I am not 100% following what you said. You are clicking your post off the homepage, and it says Category Archive: cat1, cat2? Or after you are clicking the post off the homepage, you are clicking a category name, and on the category page it says Category Archive: cat1?
If it the second, just open up archives.php. Delete the word
Here’s my archive.php
<?php get_template_part(‘content’, ‘before’); ?>
<div class="content">
<h2 class="generic"><?php
/* If this is a category archive */
if (is_category()) { printf( __( 'Category Archives: <span>%s</span>', 'themater' ), single_cat_title( '', false ) );
$the_template_part = 'categories';
/* If this is a tag archive */
} elseif (is_tag()) { printf( __( 'Tag Archives: <span>%s</span>', 'themater' ), single_tag_title( '', false ) );
$the_template_part = 'tags';
/* If this is a daily archive */
} elseif (is_day()) { printf( __( 'Daily Archives: <span>%s</span>', 'themater' ), get_the_date() );
$the_template_part = 'day';
/* If this is a monthly archive */
} elseif (is_month()) { printf( __( 'Monthly Archives: <span>%s</span>', 'themater' ), get_the_date('F Y') );
$the_template_part = 'month';
/* If this is a yearly archive */
} elseif (is_year()) { printf( __( 'Yearly Archives: <span>%s</span>', 'themater' ), get_the_date('Y') );
$the_template_part = 'year';
/* If this is an author archive */
} elseif (is_author()) { printf( __( 'Author Archives: <span>%s</span>', 'themater' ), get_the_author() );
$the_template_part = 'author';
/* If this is a general archive */
} else { _e( 'Blog Archives', 'themater' ); $the_template_part = 'archive';}
?></h2>
<?php
get_template_part('loop', $the_template_part);
?>
</div><!-- .content -->
<?php get_template_part(‘content’, ‘after’); ?>
I made a post & put the post in it’s parent & subcategory.
When I click on either category it showing Category Archives: first and then the real category name appears after that for both
like this.
Category Archives: Home Furniture
rguy84:
I am not 100% following what you said. You are clicking your post off the homepage, and it says Category Archive: cat1, cat2? Or after you are clicking the post off the homepage, you are clicking a category name, and on the category page it says Category Archive: cat1?
If it the second, just open up archives.php. Delete the word
rguy84
June 16, 2011, 4:53pm
7
And you just want Category: Home furniture? You will see something like
if (is_category()) { printf( __( 'Category Archives: <span>%s</span>', 'themater' ), single_cat_title( '', false ) );
just simply edit it to
if (is_category()) { printf( __( 'Category : <span>%s</span>', 'themater' ), single_cat_title( '', false ) );
it is like that
change the settings in the categories as show post with counts
rguy84
June 20, 2011, 12:57pm
10
You are welcome, I knew it would be simple.