get_category_link is what you are looking for. And you could just use:
<?php echo get_category_link(6); ?>
and that will output the url to the category page.
<a href="https://wordpress.stackexchange.com/questions/45845/<?php echo get_category_link(6); ?>"><?php the_title(); ?></a>
Related Posts:
- How to handle broken links created by permalink/slug changes?
- How to Check if a Page Exists by URL?
- Keep getting same permalink with WP_Query?
- Link for the page archive for posts, like using custom post types with get_post_type_archive_link
- Changing my permalink structure – will new layout conflict with existing page?
- Removing rel=”nofollow” from links posted in Post Content
- How should I add links to other pages/posts from my post?
- Switch to page template when using post permalink
- When changing pages to posts, how do you set up 301 redirects for the page URLs?
- Custom Permalink Structure for Pages & Posts
- Unabled to Change Permalinks – Even Using the “Edit” (Resets to Original Permalink on “Update”)
- Post/page title to permalink transformation – what is behind the scenes?
- Internal linking to posts permalink fail because of spaces and stripe at postname
- Link from Post to Another Post Via Clicking on Words within Original Post
- Link to older links
- Changing permalink of WordPress
- Edit post & page option does not display on latest wordpress
- Please help a newbie with blog page issue?
- Custom permalink for wordpress page / post
- Category URL to use same string as Post URL Permalink
- Post Category link is same with Page link
- Permalink base only for posts
- How to give priority to page than to posts permalink structure?
- Precedence of page permalinks over woocommerce product category links?
- Posts in Page – How to customize the URL?
- My posts section for logged in user
- One of my posts is displayed as page
- How to mix pages and sub-categories in a url
- Modifying the permalink href for posts with jquery
- Read more link not working [closed]
- After the local installation of an old WP website I can see the homepage but I can’t access to the articles, why?
- Blog posts are not appearing as subs of Blog Page
- Automatically search and replace link in content (pages/posts)?
- I want the Title of page/post to show up topmost when reading the post/page
- Permalink issue with new blog posts > getting 301 redirect
- Get content from one page and show it on another page
- get_children() Not Working with orderby Parameter
- How to automatically generate a unique random slug
- Different permalink for posts and authors
- Is there a WordPress equivalent to MediaWiki templates
- Getting an alphabetic post list with two letters onclick on letter
- Pagination not working on Custom Page Template
- Must permalinks always point to single post pages?
- Multiple loops in same page, without duplicate content
- Include related posts on a page
- Permalink Settings: optional settings doesn’t apply to editor
- $post object is null
- Is there any WordPress alternative to Book module of Drupal?
- How to change the page break URL from ../post/2 to …/post/page2/
- Convert a complex webpage into WP theme
- Setting up navigation links for posts (first, prev, next, last)
- Should a photo gallery be in a post or on a page?
- Delete post by giving its link
- Multiple loops are not reset
- Drag posts and pages so you can sort them in order
- 301 (static page instead latest posts)
- How could I change my Permalink from blog to custom structure? [closed]
- Posts vs Pages and categories
- How to dynamically parse and transform post/page content before displaying it?
- Edit permalink for certain pages
- How to create a page that shows the last 10 posts?
- $_GET parametters not working in an specific template
- the_content() Not Grabbing All Content
- I don’t want the complete article to show on homepage
- Display on page every post in blog WITH comments
- HTML Inside of Shortcode Breaks Shortcode Output
- How to setup different permlalinks for posts and pages?
- Link post images to post
- posts going to 2 pages/categories only show up in 1
- How can I see a list of all pages my WordPress site has generated?
- how to create a sub section in posts
- What would causes search to return incorrect results?
- Permalink Short code showing unnecessary link text inside the loop
- Add CSS and JS files of the template post on a WordPress page
- Can’t find webpage on All Pages or All Post menus
- how to put post customized in page
- Show code only on WooCommerce Pages
- Prevent Archive URLs
- Multiple Pages – Seperate blogs
- Posts are not showing up on next page.
- Post List Widget with custom posts and editing the Read More Link
- Display only current page -> posts tags in page
- Call posts of particular category in a page
- Is there a way to change the complete URL of the blog post for a redirecting tracking link?
- WordPress with static posts page and custom permalink structure doesn’t find posts with numeric permalinks
- Can’t seem to replicate permalink structure for localhost development site
- Add wp-link-pages to post
- Make a custom URL and link to custom Template
- Changing permalink of custom category
- Overwrite URL on blog posts
- 301 Redirecting posts without %postid% (just %post_name%) in permalink to ones with %post_name%_%postid%
- How do I add /blog/ on my permalink without affecting the portfolio project types permalink?
- Posts and pages not getting published
- Permalink remain the same on each page
- CSS – Change height of Storefront / WooCommerce product categories, but not products
- Cannot Create a new Post [closed]
- How to automatically convert a form with HTML link into post
- How to display breadcrumb on category?
- Hide page title on dedicated posts page
- Change the slug of post type using custom code