Hi I have a blog here. I have a strange thing suddenly in the post header part. In each of the posts, the first category link in the "Filed Under .........." got messed. Instead of category link it is displaying the Post URL with a "<a" at the last which ultimately leads to a 404 page. I am not a programmer and cant do much in it to fix this. Can anyone look around this code please and tell me what needs to be changed. Here is the code of postheader.php file- <div class="entry"> <!– google_ad_section_start –> <div class="postheader"> <?php if (function_exists('slds_date_stamp')) { slds_date_stamp(get_the_time('U'), $k2_post_alt); } ?> <h1 class="entrytitle" id="post-<?php the_ID(); ?>"> <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?> »</h1></a> Filed Under <a rel="nofollow" href=<?php the_permalink(); ?><?php the_category(','); ?> </a> <div class="entrymeta"> </div> </div> <!– google_ad_section_end –> Code (markup): Please tell me if any other file's code is needed to fix it. Thanks for your help.
i think you missed a semi-colon on 6th line. please replace your code with this: <div class="entry"> <!– google_ad_section_start –> <div class="postheader"> <?php if (function_exists('slds_date_stamp')) { slds_date_stamp(get_the_time('U'), $k2_post_alt); } ?> <h1 class="entrytitle" id="post-<?php the_ID(); ?>"> <a href="[COLOR="Red"]<?php the_permalink(); ?>[/COLOR]" rel="bookmark"><?php the_title(); ?> »</h1></a> Filed Under <a rel="nofollow" href=<?php the_permalink(); ?><?php the_category(','); ?> </a> <div class="entrymeta"> </div> </div> <!– google_ad_section_end –> Code (markup): hope this solves the issue. you missed semi-colon in code highlighted above.
Hey I pasted this code and nothing changed at the blog. Looks like it is the exact same code as I gave above. I can not notice any extra ";" in the 6th line in your code. Can you check it again please.
I think this one is messed up: Filed Under <a rel="nofollow" href=<?php the_permalink(); ?><?php the_category(','); ?> </a> <div class="entrymeta"> change it to this: <a rel="nofollow" href="<?php the_permalink(); ?><?php the_category(','); ?>">Filed Under</a> <div class="entrymeta"> And post some update to your blog..
As I said I am not a programmer, I have no clue where and how to check that. There is a file pagefunctions.php there but this code is not there.
Filed Under <a rel="nofollow" href="<?php the_permalink(); the_category(','); ?>"><?php the_category(','); ?></a> Code (markup): Hard to know without you telling us what it outputs.
@ Goltu actually dear, i pointed out the same mistake which others are pointing as well. But if it didn't solve the problem then there might be somefin wrong with your function. If you want us to troubleshoot it, you need to find the real place of the function where it is defined, you can perform search in your files for the_permalink() function or browse your blog directories to file that has name functions.php
The issue here is that you're including a link within a link so to speak. <?php the_category(', '); ?> Code (markup): The above function creates the full linking code as opposed to just echoing out the category name, so all you really need is :- Filed Under: <?php the_category(', '); ?> Code (markup):