0

When I echo get_permalink() in a function that's called from archive.php, it reflects the permalink of the last post that's assigned to the category.

How can I echo the permalink of the category page instead?

2 Answers 2

1

Like so:

echo get_category_link( get_queried_object() );
0

Here you go mate:

single_cat_title();

http://codex.wordpress.org/Function_Reference/single_post_title

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.