smartmouse
Member
Posted 6 years ago #
I would like to collect some documents in categories. But i do not like how WP show them. Does exist a plugin or a better way to create categories and collect documents showing only the titles, and not the entire document appended to other documents?
Sorry for my english.
What do you show: titles or the whole document is not a WP thing, it depends on your theme's template(s).
See Template_Hierarchy.
You can have a category.php template file in your theme that displays only titles. See more: Category_Templates.
The titles can be links or not. It is entirely up to you.
smartmouse
Member
Posted 6 years ago #
Thank you. I go to read these links.
smartmouse
Member
Posted 6 years ago #
I do not understand how to do because i'm not english and i'm not a programmer. Can you help me step by step.
Thank you.
I am not English either and I am not a programmer at all.
I think the articles I've linked above are pretty much "step by step" descriptions of what you have to do.
If I understood well your question, you want the category "archives" to be only list of titles - not showing text, not even excerpts.
So, create a category template (category.php) and edit The_Loop in it, i.e. remove the_content tag or the_excerpt tag and leave only the title. The best way to start to make a category.php is to save your archive.php as category.php and edit from there.
smartmouse
Member
Posted 6 years ago #
Cool! I will try as you said. Thank you bro.
smartmouse
Member
Posted 6 years ago #
I created categories.php... but how to make WP look for a file called categories.php ??
I use WP 2.02 with the Default theme...
Back to this link: http://codex.wordpress.org/Category_Templates
In particular:
Suppose the Category ID of the Category in question is 6. WordPress uses the first Template file it finds in your current Theme's directory from the following list.
1. category-6.php
2. category.php
3. archive.php
4. index.php
If you do not have a category-6.php, WordPress will check for a category.php, and so on.
I created categories.php
That's wrong. It should be category.php.
smartmouse
Member
Posted 6 years ago #
...but in this way i will modify Archives and not Categories menu!
How to modify Categories menu editing archive.php?!
Now you lost me here...
What does the menu have to do with what we were talking about till now?
smartmouse
Member
Posted 6 years ago #
See the Categories menu on the right side of the default menu.
When you click on one category it show entire post, it creates a list of all posts.
I would like to show only TITLE, instead of entire posts.
I mean when you click on a category it have to show only the titles of the posts, and then if you click one of these titles you can see the post you are searching for.
Is it clear?
I'm sorry for my english.
That's what I was trying to "teach" you since the beginning. In your catgeory.php file delete the_content tag. You are done.
smartmouse
Member
Posted 6 years ago #
It works!! Thank you very much!
Just tell me earlier! You gave me links and links where to learn :P
Anyway i say you thanks!
I did tell you in my second reply above :)
Glad that finally it works as you wanted.
smartmouse
Member
Posted 6 years ago #
Just another question:
I changed theme (Ocadia) and i do not have categories.php nor archive.php.
Then i opened index.php file and i found this code:
<?php if (is_search()) { ?>
<?php the_excerpt() ?>
<?php } else { ?>
<?php the_content(__('Read the rest of this entry »')); ?>
<?php } ?>
Here how to edit to make Categories menu showing only Titles?
Well, my friend, you should edit the theme you are going to use. Any change you make - it happens only in one theme. Otherwise you have to edit all the themes you are using.
Once again: there is NO "categories.php" template - only in singular: category.php.
If you make a category template - delete what is in the index and copy over the code from the other theme .
smartmouse
Member
Posted 6 years ago #
Sorry i do not understand :(
OK, I'll try a simple explanation.
If you edit one theme - the changes will be only in that one. If you use 17 themes - you have to edit all the 17 themes.
Do in Ocadia what you did in the other theme. Make a category.php file by saving the archive.php as catgeory.php and copy the code which works in the other theme into that file.
Which part don't you understand?
smartmouse
Member
Posted 6 years ago #
Cool!! It worked!
Thank you!!
smartmouse
Member
Posted 6 years ago #
Look to my categories:
http://www.v*rsionitradott*.it/?cat=1
http://www.v*rsionitradott*.it/?cat=2
I removed the_time, the_category and comments_popup_link tags.
But as you can see there is too space between titles.
Do you know a way to fix this problem?
Thank you.
* = e
1. Why do I have to suffer with all those ** gizmos? :( I hate when somebody wants help but they make it difficult to get to their site. Next time I will not go to your site if there is not a normal link.
2. I know how to fix it, but if I start to explain it, we will sit in front of the computer 12 hours :)
3. Paste the code of the category template to http://pastebin.com and post back with the URL.
smartmouse
Member
Posted 6 years ago #
Sorry for the gizmos but i used * because i do not want that google index these pages with the name of my site. Sorry.
I pasted the code of categories.php here:
http://pastebin.com/624209
Thank you for your help.
OK.
Try to use this one http://pastebin.com/624216
But before you have to do this:
Open the stylesheet (style.css) and add this code:
.listing {
margin: 0;
}
That should work.
smartmouse
Member
Posted 6 years ago #
You are too great!
...or maybe am i too newbie?! :D
Thank you a lot!
...it works :P
smartmouse
Member
Posted 6 years ago #
Look at those categories links i posted before.
Did you seen that little image on the left of the site? A gray rectangle.
Do you know why is it there?
smartmouse
Member
Posted 6 years ago #
Ok, thank you anyway for your help.
See you.
Make this:
<div id="content">
<div id="content" class="narrowcolumn">
like
<div id="content">
<div class="narrowcolumn">
smartmouse
Member
Posted 6 years ago #
In category.php i file i have only this code:
<div id="content" class="narrowcolumn">
I edited it to:
<div class="narrowcolumn">
It's ok now!