can you post a link to your site, pointing to this link?
what is ‘are wrong’ and ‘gets it right’ in understandable terms?
Hi Alchymth, Thanks for the reply.
Here’s a link to the site I’m working on:
http://www.mayrussell.com.au/projects/institutional/the-australian-national-university-wes-whitten-building
At the bottom of the page there is a “Return to Institutional Projects” link. It is generated by the above code.
When using Firefox and Chrome the link just links to the current page. However in Internet Explorer 8 the link correctly links back the the category page.
Just wondering if it is a bug or terrible coding?
This code from Help is also busted :
<?php
// Get the ID of a given category
$category_id = get_cat_ID( 'Category Name' );
// Get the URL of this category
$category_link = get_category_link( $category_id );
?>
<!-- Print a link to this category -->
<a>" title="Category Name">Category Name</a>
As it just redirects to the current page, not the Category in Chrome and Firefox. Internet Explorer correctly generates the link however it won’t work if you middle click the link
My permalinks looks like this if it helps:
/projects/%category%/%postname%
Okay, so in the permalinks structure adding a “/” to the end of the permalinks fixes the discrepancies between the browsers.
Hwoever the problem still remains of the link linking to the page itself not the category!
For anyone else struggling with this:
<?php
foreach((get_the_category()) as $link) {
echo '<a href="../"> < Return To '.($link->name).' Projects</a>';
}
?>
This worked in the end. Simple and avoids WordPress’ terrible way of handling and linking categories.