I am using the following:
<a href="<?php get_category_link(1); ?>">
<img src="<?php bloginfo('stylesheet_directory'); ?>/img/nav_Editorial.gif" border="0" alt="" />
</a>
and so on.
But the HTML which is generated returns this:
<a href=""> ...
Why does the function return nothing? The category IDs are correct.
instead of using that, why don't you try this:
/wordpress/category/yourcategoryname/
make sure the file path is correct.
This works for me.
sorry i should be more specific:
<a href="/wordpress/category/yourcategoryname/">
<img src="<?php bloginfo('stylesheet_directory'); ?>/img/nav_Editorial.gif" border="0" alt="" />
</a>
Otenyano
Member
Posted 2 years ago #
put an echo in front of it,
<a href="<?php echo get_category_link(1); ?>">
<img src="<?php bloginfo('stylesheet_directory'); ?>/img/nav_Editorial.gif" border="0" alt="" />
</a>
hope it helps you.
I have the following code on my home page where by 'get_category_link' used to work before I updated the WP to 2.9. Any idea where do I have to make changes? any help please?
<p>Feel free to visit our <a href="<?php echo get_category_link(6)?>">blog</a> or take a closer look at our <a href="<?php echo get_category_link(5)?>">portfolio</a>.</p>