• Kondwani

    (@kondwani)


    Hi,

    I’m using <?php wp_get_archives(‘type=monthly’); ?> to try to link to monthly archives, but instead of loading archives the link is going to index.php.

    This is the page (https://kondwani.com/stamp/news/), “News Archives” on the right are where the links are contained.

    Any help appreciated,

    Martin

Viewing 8 replies - 1 through 8 (of 8 total)
  • Doodlebee

    (@doodlebee)

    change that. That’s odd. I just tried it again and it all finally came up.

    Most of your links dont’ work – I either get a 404 page or it goes to the index page. Do you have “news” set for your category base in your permalinks? Or are your permalinks set at all?

    Thread Starter Kondwani

    (@kondwani)

    Can you try refreshing the page a couple of times? Something is intefering with the loading of the content.

    Thanks

    Thread Starter Kondwani

    (@kondwani)

    The peramlinks are set to /%category%/%postname%/ and “News” is set as a category.

    This is the first page we’re moving into wordpress after index so other links aren’t functioning yet.

    Doodlebee

    (@doodlebee)

    Right, but I’m trying to get a feel for how your content is inserted. It was a little confusing, as you have some links going to .html files, etc. Your archive for the news section is here:

    https://kondwani.com/stamp/category/news/

    But your news archive link for February 2011 is linking to here:

    https://kondwani.com/stamp/2011/02/

    which is supposed to be the archive for the entire site – it’s not “news” specific. But your “news” stuff should be in there – but you’re right, it’s going to the index page.

    Does your index.php have a layout for the archives? or do you have an archive.php template file in your theme? The category listing is showing up fine, so that tells me you have something for perhaps a specific category setup, but probably you don’t have a default archive setup – save the index.php file. If your index.php file doesn’t have an archive-specific loop, and you don’t have an archive.php file, then it’s just going to show the index page.

    Thread Starter Kondwani

    (@kondwani)

    I have an archives.php file – https://kondwani.com/stamp/archives/

    At present everything in the index.php is hardcoded in html. I was planning on waiting until I had set up the rest before adding the php to load relevant content into the index.

    Doodlebee

    (@doodlebee)

    I can only guess that because you don’t actually have the content created properly that this is the root of the issue. Usually, when I’m developing a theme for WordPress and I want to code it in HTML first, I only do it to get the proper page layouts in place. once I have that sorted, I’ll break it apart into the template files and THEN I start adding content and checking for functionality. Sounds to me like your’e trying to check the functionality before you even have all the content properly inserted.

    I just tried three localhost installs, and wp_get_archives does put out a link (like yours does) and when I click the links, it takes me to the page that has all the archived stuff in there. So perhaps you should try to finish up the theme first, before you start inserting the content? I dunno – I’ve never “mingled” the stuff before – seemed to always make things more difficult.

    Thread Starter Kondwani

    (@kondwani)

    Cheers, Doodlebee, I’ll try inserting the rest of the content and come back to this.

    Doodlebee

    (@doodlebee)

    Okay – sorry I couldn’t help more! it’s kind of hard to see it without actually *seeing* it – if you know what I mean ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘wp get archives link loads index.php’ is closed to new replies.