Well, WordPress has some integrated functions for that. Two of those would be get_category_by_slug (Codex link) or get_category_link (Codex link).
I am not sure what of_get_option() returns, but those two might help you.
Related Posts:
- Category links suddenly started giving 404 errors
- Any way to assign Post Categories and Tags to Links?
- Is it possible to select and edit the way the most recent post from a certain category is displayed on the page?
- How to enable category hierarchy for links?
- Combining post categories and link categories?
- Displaying a full post instead of a slug per category?
- Link Attachment Image to Category
- Class active for Archive link – looped out
- Why do my categories redirect?
- Get category url in loop
- Older entries link within category page
- Style category link depending on category ID
- Get paged category link programmatically
- Link To Child Category For A Post
- How to not display a category post on blog page?
- Link from navbar to categories
- javascripts files not linking to my category slugs?
- wp_insert_link not working
- How to list posts from a sub-category that is listed in a parent category (more details below)?
- Show Subcategory Name Instead of Parent Category
- Link For Portfolio Categories
- Featured image for links and categories
- Categories as selectable links on submission form
- Displaying categories and subcategories without link
- How to get category slug link? ( include parent categories)
- Only one category per post
- How to get permalinks with category base working with sub-categories
- get_categories hierarchical order like wp_list_categories – with name, slug & link to edit cat
- Exclude categories from search query
- Programmatically create product category and add thumbnail in woocommerce
- How to order the get_categories result
- List posts by category exclude current post
- How can I calculate the total number of categories at different hierarchy levels?
- How to add a background image to category and display image on category page
- Display only deepest category on a single post?
- How we add new categories by wp_insert_post
- Listing all posts from current category on page
- Show Subcategory Description
- I want exclude the particular category in sidebar
- wp_list_categories() – adding a div to each li?
- How Can You Exclude Categories From Your RSS Feeds?
- Help with multiple dropdown tags search
- How to get category URL with the slug?
- Rename Default Category (Uncategorized) Via a Function
- weekly archive for custom category
- ?cat=-1 Indexed Versions Of Homepage
- How get permalink for the current category or tag?
- using checked function to verify value against an array
- Show category images on single product page and product overview page
- Category index featured image
- Order categories by most posts
- need to add custom field in more products
- Sorting category products not working
- Show category from “Next post” and “Previous post” [edited]
- Custom archive.php: retrieve right post categories?
- Add category only if post has custom taxonomy category
- How to customize categories panel?
- category pagination got broken suddenly
- How to remove specific categories from posts?
- how to get full category path including parent and subcategories
- WordPress get from single.php back to the right category page
- Categories are not listing their respective products
- Two columns in homepage each with one category
- Pagination on category.php and tag.php not working
- WordPress link to post links to category (loop)
- How do I attach a page to a category similar to how we attach media to a post?
- Display all product tags associated with a specific product category
- How replace individual elements in the RSS feed with a single string
- how to nest specific category thumbnails inside different containers
- Adding a block with query in homepage
- what file I need to create to work date archive links?
- multiple values in an array for category__and does not work with WP_Query
- Assigning certain pages or posts to use the template of the parent page or category
- I need advice on how to structure the categories according to the layout i have
- How to get posts using category slug in ClassiPress?
- Assign author to category and not only posts
- Add properties to term object
- How to fetch common posts from two feeds?
- Display all Categories
- custom wp_list_categories in single.php
- How to target all woocommerce categories that don’t have any subcategories in them?
- echo $category[0]-> cat_name; shows only one category name
- Category pages resolving with and without category prefix
- How can i echo next and previous custom category from a Taxonomy
- Change post category within pre_get_posts
- Subcategory Page 404ing
- displaying one category on one page
- Ajax Category add doesn’t update the list table custom column
- Question About Messing With Category Pages and Descriptions
- how to get postmeta info based on multiple categories?
- create post with main category and other categories from admin panel
- get_posts – require all categories
- Using categories and pages in menus
- Gettind 404 not found wen click the view button for a given category custom post type portfolio
- list first post of Child Category on Category page
- Use get variable when rewritten url in wordpress
- Back to category link
- Custom Woocommerce Category view
- Show thumbnails 1-12 of category x on any given page
- How to delete categories in WordPress