I am creating blog website for my client. I want to create couple of buttons and put them in the page. When clicking theese buttons user gotta be directed to certain categories.

Thank you in advance

  • There's like 2 dozen different ways to do this, minimum... ...can you be more specific with regards to what you've tried, how your site is built (commercial theme, child theme, custom theme, page builder, etc.) and what you actually have access to? Dec 18, 2020 at 15:09

1 Answer 1


If you know the id of the category, this is how you can output a link to category.

<a href="<?php echo get_category_link( $idofcategory ); ?>" title="Category Name">Category Name</a>

Check this : https://developer.wordpress.org/reference/functions/get_category_link/

Above page also shows how you can get the category link from category name, in case if you don't know id of the category.

Your Answer

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

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