Articles Listed
-
Hi, how do I display a list of articles that match a month or category?
-
This is what you’re looking for:
ok, but at the moment when I click on a category or month, it goes to this:
https://www.nicktoye.co.uk/2005/12/
That is for december obviously, but on this page it shows the most recent article in that month.
I’m sorry but i’m really confused.
<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
<div><h2>” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”>
<?php the_title(); ?>
</h2></div>
<!– end of article title –><div><?php the_content(); ?></div>
<div>
<div style=”clear:both”></div>
<span class=”date”><?php the_time(‘jS F Y’); ?></span>
| <span class=”viewComment”>
<?php comments_popup_link(); ?>
</span> | <span class=”category”>
<?php the_category(‘,’); ?>
</span></div> <!– end of updatedBox –>
<?php wp_link_pages(); ?>
<?php include(ABSPATH . ‘wp-comments.php’); ?>
<?php endforeach; else: ?><?php _e(‘Sorry, no posts matched your criteria.’); ?>
<?php endif; ?>
Anyone
Can you tell me where your Category list is and also your Archives? I don’t see them. Sorry.
Oh sorry this is the loop from my home page, which is what loads in when I click on an article, its the permalink structure page.
I think the page you need is:
https://www.nicktoye.co.uk/thoughts.php
<div id=”archive”>
<ul class=”bullets”>
<?php get_recent_posts();?></div>
<div id=”archivedMon”>
<h3>Articles By Month</h3>
<ul class=”bullets”>
<?php get_archives() ?></div>
<div id=”archivedCat”>
<h3>Articles By Category</h3>
<ul class=”bullets”>
<?php wp_list_cats(‘arguments’); ?></div>
When I click on a Category, it appears to tak me to the appropriate Post. And when I click on the Archives month, it seems to work, too.
when you click on the archives month it takes you to a post in that month, but I want it to go to a page that shows all the articles in that month like a list, which can then be clickable to open that article
Look at the discussion in the “post in a page” forum item.
That’s not really helping much. I don’t understand why it is so hard to achieve, I mean what is the point of an archives page if you can’t display all the posts in the archive.
When I click on December I want it to display all the posts in December, and then if I click on article one in December it shows that article.
This really shouldn’t be too hard to achieve. This is one of the reason why i may move to Symphony, its ability to produce what you want without having to go through lengthy forum threads.
How many posts do you have in December? That is the way it should work out of the box.
about 5
but when i click on it displays it as an article, I want it to display december as it does with the recent articles list
How many posts do you have set to display under the Options-Reading configuration?
I suspect you have set in Options > Readings to show one article/post per page.
That setting applies to ALL your pages/views. That’s the default setting of WP.
If you want different number of posts to be displayed in different views, you have to use a plugin. Here are two of them:
https://mattread.com/archives/2005/03/custom-query-string-plugin/
https://rephrase.net/miscellany/05/perpage.phpsYeah I know, I only want one article per page in its entire form. But when I am clicking on the months or categories I want it to look like this:
Articles in December
Article One
Article Two
Article ThreeWill these plugins allow me to do this? Why is it in a form of a plugin and not just part of the makeup of the application.
You don’t need a plugin for that, you can just do that with WordPress.
Just edit your Archives Template. If you just want a list of post-titles (headlines) you can do that. If you want the date, excerpt, or post content, you can display that, or not.
In any case, every article you write has a “single” page, all its own, already. At the permalink URL of that post ID. So I like to make my Archives a month of headlines from that month, each headline click to the single page article.
- The topic ‘Articles Listed’ is closed to new replies.