I am trying to make an archive list in my sidebar showing month, year and number of post, that works with this code <?php wp_get_archives(‘type=monthly&show_post_count=1’); ?> that I have inside my sidebar2.php which is included with <?php include (‘sidebar2.php’); ?> on the page that i want the sidebar AND the archive results to show.
My problem is that the links that appear (like april 2012 (2)) just takes me to the index file..
How do i get them to show whats actually posted in april 2012? I’m a neewbie so please be gentle 😉
<?php wp_get_archives(apply_filters(‘widget_archives_dropdown_args’, array(‘type’ => ‘monthly’, ‘format’ => ‘option’, ‘show_post_count’ => $c))); ?>
Of course, the real problem might be that you do not have an archives template. Do you? (Check in Appearance >Editor)
Actually I do have an archives template named archives.php if thats what you mean?
It looks like this:
I don’t actually know whats suposed to stand there, so please tell me if you do..
Yea, that really doesn’t look like a good archives template to me. (By the way, here is your pastebin code http://pastebin.com/kyrmyrVP )
Replace code with this:
Nevermind, got the code in my mail..
But it doesn’t work, still the same results as always, the only thing that shows up is my index page even if the adress is right: http://localhost:8888/wordpress/2012/04
So, this is resolved, HeleneV?? You fixed your problem? Also the link you posted above isn’t a valid URL
Yes. I know, it was just to show how the adress looked like even if the page was the index.
I now have this in my sidebar:
<?php wp_get_archives(apply_filters('widget_archives_dropdown_args', array('type' => 'monthly', 'show_post_count' => $c))); ?>
And this in my archive.php:
- The topic ‘Archive links not working’ is closed to new replies.