• hello:

    I’m trying to put the ARCHIVES link in the header https://509gossip.com/archives and I’m getting this error below:
    “404 – Not Found | Sorry, no posts matched your criteria.”.

    here is my code:
    ———————————————————-

    <div class="Menu">
     <ul>
      <li>
      <a class="<? echo (is_home())?'on':''; ?>" href="<?php echo get_option('home'); ?>/"><span>Home</span></a></li>
      <li><a <?php if (is_archive() || is_page('archives')) echo('class="current" '); ?>href="<?php bloginfo('url'); ?>/archives/">Archives</a></li>
      <?php $pages = wp_list_pages('title_li=0'); ?>
     </ul>
    </div>

    ———————————————————-
    It looks like it’s not calling the archives.php file. Is it a path issue? Please help.

    Ken

Viewing 3 replies - 1 through 3 (of 3 total)
  • It looks like it’s not calling the archives.php file.

    And it never should!
    No template file should be ever linked directly. Did you, actually, create a new Page by using the Page template named archives??? – That’s how it is done.

    Thread Starter mabekeke

    (@mabekeke)

    Hi Moshu.
    Thanks for replying. I created a new page and I no longer get the 404 error. However, it now gives me a blank page for archives. How do I make it display the archives now? thanks in advance. I’ve been searching for 2 days now through this forum. Please help.

    Check out the default theme’s archives.php template and copy over the relevant code.

    BTW, what code do you have in your archives.php template file?
    Don’t put in here – use a pastebin service like https://wordpress.pastebin.ca.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Header Links Broken, Links in Header’ is closed to new replies.