I am trying to remove text from the title. now when i click on pic it is linked to my categories and on that page in title i get “category archives : my category title….ok what i want to do is remove the text “category archives: ” part…. i have tried multiple changes in the code in various php in my theme without success….i am using the sliding doors theme by wayne. so if someone can direct me to the appropriate .php where i need to insert or remove some code it would be great my site is onehundredclicks.co.cc
Does this help:
Basically, you need to look in all the php files that look like *category.php and possibly archive.php and possibly index.php depending on how your theme is dealing with category lists. But somewhere in all those files you should find the code that’s outputting the text. Possibly in more than one of the files.
Just get rid of the code that’s outputting the text.
Hopefully you’ll be doing this in a child theme. Much, much better to do it in a child theme.
Gee Peredur.. Tks for the quick replay…actually i have not been doing changes in child theme…oops…i will look again in the phps you have listed and come back and also will read the suggested link…
Does this help in respect of child themes:
(fourth answer, starting, “No PHP needed…”)
ok well here is the category.php…listen i am really noob when it comes to code
printf( __( ‘Category Archives: %s’, ‘slidingdoor’ ), ‘<span>’ . single_cat_title( ”, false ) . ‘</span>’ );
$category_description = category_description();
if ( ! empty( $category_description ) )
echo ‘<div class=”archive-meta”>’ . $category_description . ‘</div>’;
/* Run the loop for the category page to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-category.php and that will be used instead.
get_template_part( ‘loop’, ‘category’ );
</div><!– #content –>
</div><!– #container –>
<?php get_footer(); ?>
tks i will back on later
And it’s Oops! for me as well. I see I referred you to files that look like *category.php, when I should have said category*.php
This is the bit that’s outputting the heading:
<h1 class="page-title"><?php printf( __( 'Category Archives: %s', 'slidingdoor' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?></h1>
And this is the bit you don’t want:
'Category Archives: %s'
The %s represents the category name. So if you want the category name to show, you’ll need to change the code above to:
<h1 class="page-title"> <span><?php single_cat_title( '', false ); ?></span> </h1>
That should work, I think. Although I’m pretty sure the span element is also redundant. I’d try it without and if all was well I’d leave it out, otherwise just put it back
You don’t need all the printf() stuff and the __() stuff because you’re not doing anything multilingual. You’ve deleted the only thing that could have been translated (i.e. ‘Category Archives’), so you can just output the text directly.
If you don’t even want the category name to show you can just delete the whole lot (that is, the whole lot in my first code block above).
If you’re not doing this in a child theme, make sure you take a copy of the original code before you alter it so you can put it back if necessary.
If you do create a child theme, following the instructions I give in the link I posted, just copy your category.php file to your child theme and alter it there. If you make a mistake just recopy the original from the parent theme back over the file in the child.
Wow that is great…….i will do that this morning…as to the the child theme i should do it. i always write down any of the changes i make in a book. i have site backed up and a list of all the plugins i need…i am getting to the child theme…tks for all your help
and that worked great…i was looking in all the wrong places before
Hmm can’t seem the find the ‘Category Archives:’ reference in the blogolife theme. I have it installed at stewkeene.com and I would love to be able to remove the ‘Category Archives:’ reference in category pages.
Can anyone help?
I’m having the same problem as Azanmi.
I have gone through all the codes, even copied them into word and looked for category archives: using “find” option, without success.
Can anyone help us?
I’ll have to use another theme if I can’t fix this.
Blogolife is organised differently. The output you are looking to suppress is to be found in content.php:
<div class="category"><b><?php _e('Category:', 'wplook'); ?></b> <?php the_category(', ') ?><div class="end"></div></div>
Thanks! However the reference I have is “Category Archives:”
You can see it here: http://www.stewkeene.com/category/guests-in-arizona-invited-to-provide-information-regarding-home-purchasing/mortgage-planning/
Thank you Peredur.
I tried to erase the whole line you suggested in content.php
<div class=”category”><b><?php _e(‘Category:’, ‘wplook’); ?></b> <?php the_category(‘, ‘) ?><div class=”end”></div></div>
But that did not change anything.
So I put it back in.
Here you can see the “Category Archives:” before my category name “fréttir”.
Thank you so much for your help.
Well, I’ve had a quick look, but I can’t see offhand where else the text would be. Have you tried contacting the developers? There site is:
And I notice that they have a support page.
Thanks, I’ll check with them and post the result here.
- The topic ‘remove "category archives" text from title’ is closed to new replies.