Display all posts by using tag.php
-
Hi,
Please how can i display all posts classed under a tag (by hacking my tag.php template) ?
-
Well if you use something like the Tag Cloud Widget, or the_tags() or wp_tag_cloud() in your theme, then WordPress will present links for your tags. Then when a particular tag is clicked, the Template Hierarchy will be followed and a display of posts in that tag will be presented.
Now if you want to “customize” the way the posts in a particular tag are displayed then review the Tag Templates article.
Now if you want to “customize” the way the posts in a particular tag are displayed then review the Tag Templates article.
That’s what i need to use : how can the Tag Templates to display ALL POSTS classed in it ?
Again, you may not need to do anything. Switch to the WordPress Default theme and see how it displays tags with each post. Then click on one of those tags and see how the posts that belong in that tag get displayed. There is no tag.php with the Default theme — WordPress and the Template Hierarchy use the archive.php in that theme to display the tag archives.
Yes i understund what you have written, In my theme i use tag.php (not archive.php)but what i need is to delete navigation (next / previous entries) to display all posts classed in the tag page (excuse my little english i am french …)
Assuming you want to show all of the posts on a single tag page, try adding
<?php query_posts('&posts_per_page=-1');?>just before the start of the Loop.I try that show all posts off all the blog not only posts classed under a single tag 🙁
If you want a plugin try http://wordpress.org/extend/plugins/new-tag-cloud/ new tag cloud. I would also suggest hard coding it as shown above, but this is a small plugin and caches results for performance.
If you want a plugin try http://wordpress.org/extend/plugins/new-tag-cloud/ new tag cloud. I would also suggest hard coding it as shown above, but this is a small plugin and caches results for performance.
Thank’s, I have tested this plugin but it do not do what i have indicated above 🙁
If you want to fetch posts from a tag, use the query_post function.
query_posts('tag=mydesiredtag');
http://codex.wordpress.org/Template_Tags/query_posts#Tag_ParametersGood call Gerald, funny how we miss the obvious sometimes!
Good funcion, but do not do what i need …
UP PLEASE…
before the loop, try
<?php global $query_string; query_posts($query_string . '&posts_per_page=-1');?>http://codex.wordpress.org/Template_Tags/query_posts#Usage_Note
Great ! it work thanks very match alchymyth
before the loop, try
<?php global $query_string;
query_posts($query_string . ‘&posts_per_page=-1’);?>http://codex.wordpress.org/Template_Tags/query_posts#Usage_Note
The topic ‘Display all posts by using tag.php’ is closed to new replies.