Archives Navigation Link Not Working in Depo Masthead Theme
-
I’m a newbie and just launched yesterday https://www.catalytica.biz/360salon and the Archive link in the navigation delivers as 404 Not Found error message saying “The requested URL /360salon/2010/ was not found on this server.”
Since Depo Masthead wasn’t officially available for .org, I downloaded the files and I suspect that the code is sending Archives to look on WordPress.com servers.
Since this page isn’t listed as one of the pages I can edit, can anyone tell me how to direct that Archive nav link to my my servers and what folder structure I would need there to support this functionality?
Many thanks!
-
https://www.catalytica.biz/360salon/?m=2010 works.
Your permalink setting is default.
You must set permalink to %postname%Thank you, kz, for your reply, but it’s a bit over my head…
Can you tell me where that permalink lives that I need to change to %postname% ?
Thanks!
Thanks for sticking with me on this, kz…
I still haven’t got it though. Sigh.
I re-read the post about permalinks. Went to my permalink settings. They were set for day & name.
I tried typing all of the following in custom changes and none have worked:
/index.php/%postname%/
/index.php/archives/%postname%
/index.php/%date%/%postname%
/index.php/%year%/%postname%
/%postname%/
%postname%I continue to get a 404 error at https://catalytica.biz/360salon/2010/ when I click the ARCHIVES link in the navigation.
Any other ideas what I might be doing wrong or missing?
You need not include ‘index.php’ in your permalink.
Now your permalinks are:
https://catalytica.biz/360salon/index.php/about-360salon/ — worked.
https://catalytica.biz/360salon/index.php/conversations/ — worked.
https://catalytica.biz/360salon/2010/ — didnt work.
I think you set ‘/index.php/%postname%/’ now.
But why only yearly archive link doesnt include ‘index.php’ ?You must set ‘%postname%’ to [common options|custom structure], and save option.
Then, your permalinks work fine with:
https://catalytica.biz/360salon/about-360salon/
https://catalytica.biz/360salon/2010/Pls show your .php code that output the navigation.
Hi kz –
I would happily show you my “.php code that output the navigation” but I don’t know where that is to show you. I know a bit of html, but php is totally foreign to me.
Yes, the question is exactly as you say, “why only yearly archive link doesnt include ‘index.php’ ?”
Yousay “You must set ‘%postname%’ to [common options|custom structure], and save option.” But I have done this already — as well as many other variations mentioned above.
No matter what I change the permalinks Common Settings to the archive navigation still directs to https://catalytica.biz/360salon/2010/
In what file would I find the php code for the navigation?
kz –
I’ve been trying to find the php code for the navigation. The following is a file called “header.php” that I found in the theme folder (the theme I’m using of course).
I do see reference to Archive here, but can’t read the code. Does this tell you something about the problem?
<html xmlns=”https://www.w3.org/1999/xhtml”>
<head>
<?php language_attributes(); ?>
<meta http-equiv=”Content-Type”
content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />
<title><?php wp_title(); ?> <?php bloginfo(‘name’); ?></title>
<link rel=”stylesheet”
href=”%3C?php%20bloginfo%28%27stylesheet_url%27%29;%20?%3E”
type=”text/css” media=”screen” />
<link rel=”alternate” type=”application/rss+xml”
title=”<?php bloginfo(‘name’); ?> RSS Feed”
href=”%3C?php%20bloginfo%28%27rss2_url%27%29;%20?%3E” />
<link rel=”pingback”
href=”%3C?php%20bloginfo%28%27pingback_url%27%29;%20?%3E” />
</head>
<body>
>
<!–[if gte IE 6]><link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_directory’); ?>/ie.css” type=”text/css” media=”screen” /><![endif]–><?php wp_enqueue_script(‘jquery’); ?>
<?php if ( is_singular() ) wp_enqueue_script( ‘comment-reply’ );
wp_head();
?>
<script type=”text/javascript” charset=”utf-8″>
/*<![CDATA[ */
//set title font size
jQuery(document).ready(function() {function resize(selector, max) {
jQuery(selector).each(function() {var width = jQuery(this).width();
var height = jQuery(this).height();
if(width > max) {
var r = ( height / width );
var w = max;
var h = ( w * r );
jQuery(this).height(h).width(w);
}});
}resize(‘#home .gallery img’, 90);
resize(‘#home .entry img’, 300);
resize(‘#home .wp-caption img’, 290);
resize(‘#home .wp-caption’, 300);
jQuery(‘#home .wp-caption’).css(‘height’, ‘auto’);
});
/* ]]> */
</script><?php if((is_front_page() or is_home()) && !is_page()) { echo ‘ id=”home”‘; } ?>>
<div id=”page”>
<h1 class=”name”><a
href=”%3C?php%20echo%20get_option%28%27home%27%29;%20?%3E/”
title=”<?php bloginfo(‘description’); ?>”><span><?php $my_query = new WP_Query(‘showposts=1’);
while ($my_query->have_posts() && $count < 1) : $my_query->the_post();
$do_not_duplicate = $post->ID;?><?php $count++; $title = get_userdata($post->post_author); $title = $title->display_name; ?><?php endwhile; ?><?php echo (get_option(‘depo-author-name’)) ? get_option(‘depo-author-name’) : $title; ?> </span></h1>
<div id=”container”>
<div class=”sleeve”>
<div id=”header”><?php $title = strlen(get_bloginfo(‘name’));
if($title >= 30) $title = 40;
$new_size = (1000/$title)*2;
if($new_size > 120) $new_size = 120;
if(preg_match(‘/.*\s.*/’,$title) === false && ($title > 20)) $new_size = 72;
$size = $new_size;?>
<h1 style=””><?php if(!is_front_page()) { ?> <a
href=”%3C?php%20echo%20get_option%28%27home%27%29;%20?%3E/”
title=”<?php bloginfo(‘description’); ?>”><?php } ?><?php bloginfo(‘name’); ?><?php if(!is_front_page()) { ?> <?php } ?>
</h1>
<ul id=”menu”>
<?php $pages = get_pages(‘sort_column=menu_order’);
foreach ($pages as $pagg) {
if ( $pagg->post_parent == 0 ) {
$option = ‘- ID).'”>’;
$option .= $pagg->post_title;
$option .= ‘<span>|</span> - <a
href=”%3C?php%20bloginfo%28%27url%27%29;%20?%3E/%3C?php%20echo%20mysql2date%28%27Y%27,%20get_lastpostdate%28%27blog%27%29%29;%20?%3E/”><?php _e(‘Archives’, ‘depo-masthead’); ?><span>|</span> - <?php _e(‘RSS Feed’, ‘depo-masthead’); ?>
‘;
echo $option;
}
}
?></div>
<div id=”content” class=”group”></div>
</div>
</div>
</div>
</body>
</html>Change this:
<a href="<?php bloginfo('url'); ?>/<?php echo mysql2date('Y', get_lastpostdate('blog')) ?>/"><?php _e('Archives', 'depo-masthead'); ?></a>
To this:
<a href="<?php echo get_year_link(mysql2date('Y', get_lastpostdate('blog'))); ?>/"><?php _e('Archives', 'depo-masthead'); ?></a>
Of course, you must set ‘%postname%’ to [common options|custom structure].
Weird. The code was truncated in my last post, so I’m trying it again…
The code you quoted above and said to change didn’t exist as you wrote it. The code that was closest was this:
<a
href=”%3C?php%20bloginfo%28%27url%27%29;%20?%3E/%3C?php%20echo%20mysql2date%28%27Y%27,%20get_lastpostdate%28%27blog%27%29%29;%20?%3E/”><?php _e(‘Archives’, ‘depo-masthead’); ?>So I tried changing that (the above quoted code) to what you recommended:
<a
href=”<?php echo get_year_link(mysql2date(‘Y’, get_lastpostdate(‘blog’))); ?>/”><?php _e(‘Archives’, ‘depo-masthead’); ?>I also set the common setting/custom structure to %postnames%
This broke the page navigation completely. More accurately, it removed the header entirely.
I thank you for your help, but I couldn’t execute your suggestion exactly as you wrote it because the code you said to replace just didn’t exists are you wrote it.
Sigh.
I put things back, but Archive issue remains a mystery…
Codex:Function Reference/get year link
My code worked fine.
See ‘To catalytica:’ section on my site https://wpxtreme.jp/archivesI think your something mistake lead the page broken.
For Example, did you close A tag by using</a>
?SET %postname%, NOT %postnames%
Hi kz –
I wanted to let you know that a local friend helped me with this problem and found another workaround, since I wasn’t able to make yours work — although you clearly could ??
Here’s what he said he did, FYI…
“As it turns out, there is a bug with WordPress in that it sometimes doesn’t write your htaccess files correctly. The solution was to edit the htaccess file to remove all information in it and then update the permissions.”I appreciate all your tremendous efforts to help me kz!!
Peace
Hi kz
you seem knowledgable in this area. I’m not a complete newbie to wordpress but I’m certainly not a pro.
I’m having a very similar issue, and wondering if you can take a look?
My archive and single files do not display my navigation bar, even though their parents https://www.thebreadcrumbtrail.org/big-blogs and the home page https://www.thebreadcrumbtrail.org/ do. Yet they all point to my header.php. So why the difference?
Here is the source code for my archives page:
<?php /* Template Name: archive */ ?> <?php get_header(); ?> <!-- container start --> <div id="container"> <?php get_sidebar(); ?> <!-- content start --> <div id="content"> <?php if(have_posts()) : ?> <?php while(have_posts()) : the_post(); ?> <div class="post_top_frame"></div> <div class="post"> <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <div class="postmetadata">Posted in <?php the_category(', ') ?></div> <div class="post_date"> <?php the_time('d') ?> <?php the_time('M') ?> </div> <div class="entry"><?php the_excerpt(); ?></div> <div class="endline"></div> <?php the_tags('<p class="tags">Tags: ', ', ', '</p>'); ?> <div class="bookmark"><?php include(TEMPLATEPATH . '/bookmark.php'); ?></div> <div class="read_comments"><a href="<?php comments_link(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/read_comments.gif" width="144" height="16" alt="read comments" /></a></div> </div> <div class="post_bottom_frame"></div> <?php endwhile; ?> <?php wp_pagenavi(); ?> <?php else : ?> <div class="notfound"><p>Content Not Found!</p><p>Please try again.</p></div> <?php endif; ?> <!-- Ad start --> <div class="post_ads"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/468x60.gif" width="468" height="60" alt="ads" /></div> <!-- Ad end --> </div> <!-- content end --> <div class="endline"></div> </div> <!-- container end --> <?php get_footer(); ?>
My Blogs page
<?php /* Template Name: index */ ?> <?php get_header(); ?> <!-- container start --> <div id="container"> <?php get_sidebar(); ?> <!-- content start --> <div id="content"> <?php if(have_posts()) : ?> <?php while(have_posts()) : the_post(); ?> <div class="post_top_frame"></div> <div class="post"> <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <div class="postmetadata">Posted in <?php the_category(', ') ?></div> <div class="post_date"> <?php the_time('d') ?> <?php the_time('M') ?> </div> <div class="entry"><?php the_content('[...]'); ?></div> <div class="endline"></div> <?php the_tags('<p class="tags">Tags: ', ', ', '</p>'); ?> <div class="bookmark"><?php include(TEMPLATEPATH . '/bookmark.php'); ?></div> <div class="read_comments"><a href="<?php comments_link(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/read_comments.gif" width="144" height="16" alt="read comments" /></a></div> </div> <div class="post_bottom_frame"></div> <?php endwhile; ?> <?php wp_pagenavi(); ?> <?php else : ?> <div class="notfound"><p>Content Not Found!</p><p>Please try again.</p></div> <?php endif; ?> </div> <!-- content end --> <div class="endline"></div> </div> <!-- container end --> <?php get_footer(); ?>
and my header
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="https://www.w3.org/1999/xhtml"> <head> <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" /> <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" /> <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <?php wp_get_archives('type=monthly&format=link'); ?> <?php //comments_popup_script(); // off by default ?> <?php if (is_single() and ('open' == $post-> comment_status) or ('comment' == $post-> comment_type) ) { ?> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/prototype.js.php"></script> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/effects.js.php"></script> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/ajax_comments.js"></script> <?php } ?> <?php wp_head(); ?> </head> <body> <!-- warpper start --> <div id="wrapper"><div id="bottom_frame"><div id="top_frame"> <!-- header start --> <div id="header"> <div id="searchform"><?php include(TEMPLATEPATH . '/searchform.php'); ?></div> <div id="rss"><a href="<?php bloginfo('rss2_url'); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/spacer.gif" width="38" height="40" alt="RSS" /></a></div> <div id="navigation"> <div id="top_nav"> <ul> <li><a href="<?php echo get_option('home'); ?>"><img alt="Home" border="0" src="./wp-content/themes/Breadcrumb trail/images/pngs/home.png" /></a></li> <li><a href="/big-blogs"><img alt="Big Blogs" border="0" src="./wp-content/themes/Breadcrumb trail/images/pngs/Big Blogs.png" /></a></li> <li><a href="/trails"><img alt="Trails" border="0" src="./wp-content/themes/Breadcrumb trail/images/pngs/Trails.png" /></a></li> <li><a href="www.thebreadcrumbtrail.org/ese-travel"><img alt="ESE Travel" border="0" src="./wp-content/themes/Breadcrumb trail/images/pngs/ESE Travel.png" /></a></li> <li><a href="www.thebreadcrumbtrail.org/gallery"><img alt="Gallery" border="0" src="./wp-content/themes/Breadcrumb trail/images/pngs/Gallery.png" /></a></li> <li><a href="www.thebreadcrumbtrail.org/crumbs-about-us"><img alt="Crumbs About Us" border="0" src="./wp-content/themes/Breadcrumb trail/images/pngs/Crumbs About Us.png" /></a></li> <li><a href="www.thebreadcrumbtrail.org/links"><img alt="Links" border="0" src="./wp-content/themes/Breadcrumb trail/images/pngs/Links.png" /></a></li> </ul> </div></div> </div> <!-- header end -->
boy I read all the comments and still don’t understand how to fix the Archive link on the page. I wasn’t sure if this was fixed with the conversation. Can anyone help me rellink the archive link (home page) to the Archive page? I am hosting on GoDaddy and using WordPress there.
Thanks,
Nancy - ID).'”>’;
- The topic ‘Archives Navigation Link Not Working in Depo Masthead Theme’ is closed to new replies.