Why Is My Wordpress Category Showing Up As Category Archive!

7 replies
  • WEB DESIGN
  • |
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.
#archive #category #showing #wordpress
  • Profile picture of the author Sheryl Polomka
    When you click on the post or on the category? I think many themes have it that when you click on the category it says 'archive' of that category. You should be able to change that under appearance >> editor >> not sure which file off the top of my head.
    Signature
    {{ DiscussionBoard.errors[4078355].message }}
    • Profile picture of the author highbids
      Thanks I'll search for it in editor it's also showing up in all the categories.

      Originally Posted by Sheryl Polomka View Post

      When you click on the post or on the category? I think many themes have it that when you click on the category it says 'archive' of that category. You should be able to change that under appearance >> editor >> not sure which file off the top of my head.
      {{ DiscussionBoard.errors[4078406].message }}
    • Profile picture of the author highbids
      Originally Posted by Sheryl Polomka View Post

      When you click on the post or on the category? I think many themes have it that when you click on the category it says 'archive' of that category. You should be able to change that under appearance >> editor >> not sure which file off the top of my head.
      Here's a list of templates for my theme which
      is NewsPublish 1.0 how do I fix this.

      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)
      {{ DiscussionBoard.errors[4080705].message }}
  • Profile picture of the author Sheryl Polomka
    Just looking at one of my own Wordpress sites I went into the 'Archive' file and found this piece of code:

    <h2 class="pagetitle"><?php printf(__('Archive for the ‘%s’ Category', 'kubrick'), single_cat_title('', false)); ?></h2>

    I removed the following:

    Archive for the

    So the code then looked like this:

    <h2 class="pagetitle"><?php printf(__('‘%s’ Category', 'kubrick'), single_cat_title('', false)); ?></h2>

    Now when I click on a category on my site it just says the category name and not Archive for the category. That should fix it for the categories. I'm not sure what you mean by clicking on the post and seeing it Archived, I've only seen it on the categories page.
    Signature
    {{ DiscussionBoard.errors[4080873].message }}
  • Profile picture of the author highbids
    I made a post & put the post in it's parent & subcategory.

    When I click on either category it's showing Category Archives: first
    and then the real category name appears after that for both like this.

    Category Archives: Home Furniture
    {{ DiscussionBoard.errors[4081111].message }}
  • Profile picture of the author highbids
    Here's my archive.php file which part should I remove.

    <?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'); ?>
    {{ DiscussionBoard.errors[4081151].message }}
  • Profile picture of the author highbids
    I edited the archive.php file & that did it thanks all for the help.

    PHP:
    ---------
    if (is_category()) { printf( __( 'Category Archives: <span>%s</span>', 'themater' ), single_cat_title( '', false ) );
    ---------
    just simply edit it to
    PHP:
    ---------
    if (is_category()) { printf( __( 'Category : <span>%s</span>', 'themater' ), single_cat_title( '', false ) );
    {{ DiscussionBoard.errors[4081939].message }}

Trending Topics