Hello,
I want to remove the 'read more' button under these posts on this category page and also perhaps increase the number of words it shows for each post. I don't know what file to edit.
Thanks,
Chris
Hello,
I want to remove the 'read more' button under these posts on this category page and also perhaps increase the number of words it shows for each post. I don't know what file to edit.
Thanks,
Chris
Try creating a new template file for that category.
Is there an easier way?
Not if you want to only make this change for 1 specific category.
I want to be able to have multiple categories that have the same template as I am describing.
Basically, for all of the "category" pages, I want it to have the template in the example above MINUS the read more button.
In that case you could amend your current category template file (presumably catgeory.php) by adding <?php global $more; $more = -1;?> before the start of the Loop.
Where is the start of the loop? :S
I am editing category.php as we speak, from wp-includes.
No!!
You need to edit your theme's category.php file.
LOL. Right. I am in categories.inc.php... I believe that is the file. It reads:
<?php
$parents = getParentCategories();
foreach($parents as $parent) {
echo "<div class='box'><h3>id )."'>$parent->name</h3>";
$children = getChildCategories($parent->id);
$index = 0;
foreach ($children as $child) {
if($index%4 == 0) {
echo "
"
$index ++;
if($index%4 == 0 || $index == count($children)) {
echo "
So where would I put the line?
These are the other files that I can access from WordPress.
404 Template
(404.php)
All Posts Page Template
(posts.php)
Comments
(comments.php)
Footer
(footer.php)
Header
(header.php)
Main Index Template
(index.php)
Newsletter Page Template
(newsletter.php)
Page Template
(page.php)
Search Form
(searchform.php)
Search Results
(search.php)
Sidebar
(sidebar.php)
Single Post
(single.php)
Theme Functions
(functions.php)
categories.inc.php
(categories.inc.php)
home.php
(home.php)
popup_comment.inc.php
(popup_comment.inc.php)
thumb.inc.php
(thumb.inc.php)
thumbBigger.inc.php
(thumbBigger.inc.php)
timthumb.php
(timthumb.php)
widgets.php
(widgets.php)
Styles
Stylesheet
(style.css)
My guess is that your theme is re-using the index.php template file to display your categories and archives. If you are posting small code snippets can you post them inside backticks (or use the code button) so that the code remains readable. Larger code blocks should be placed in the the pastebin and the pastebin url posted here.
Excellent! I removed a line in the index file and it fixed my problem. Thank you!
This topic has been closed to new replies.