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)
- WordPress Multiple Category Search
- get all tags from category
- How can I add the featured image functionality to a custom taxonomy?
- WordPress and isotope filtering
- Check if current category has subcategories
- 5 blogs on one WordPress site
- Delete a specific category when deleting a user
- 404 error on subcategory pages
- Add line breaks in Category description via enter
- Filtering WordPress Contents based on URL
- Display only the latest post from multiple categories
- Mass/Bulk assign categories to posts
- Sticky Posts Not Sticking to Top of Category Archive
- How to exclude categories from recent posts, recent comments & category widgets?
- hide specific categories from showing
- Category Search functionality on category metabox (wordpress admin)
- how do I filter single_cat_title to remove all instances of a particlular word
- Category page shows Oops! That page can’t be found
- How can I enable a TINYMCE rich text editor in the admin interface?
- WordPress order categories by ID
- ACF: Display category name using taxonomy field
- query order by category
- How to make 2 tag feeds show up on 1 page?
- Shortcodes not working in category or tag description
- Best way of getting WooCommerce category path
- Display the last post by each category?
- Post in multiple categories
- Order categories by name or view count
- Access current post parent and sub category
- Give a page priority over a category that has the same name?
- How to rewrite the post URL according to the category?
- Sticky post for each category on category pages [duplicate]
- ajax for filtering posts by category in wordpress loops
- Create category post shortcode
- Question on using custom structures for categories
- How to add orderby parameter for sorting on category.php
- delete category name in the pages
- Wrong category nice name is displayed on archive page
- Tags Instead of Category
- Remove category link
- Generating a feed of all but one category of posts
- Pretty URLs with Categories and Tags
- Select posts that match multiple category names, must match all categories listed
- How can i display category title over thumbnail?
- How to add categories using mysql
- How to use category slug with a regular page
- Display all categories but only if they have posts in them that have a specific tag assigned
- How to fix select filter on category
- Show audio player only in specific post type category
- Check with Jquery if second level checkbox from categories are checked
- display current portfolio categories from a specific parent
- Regarding Tags And Categories
- How to show entries related to main category
- selecting categories that have products with tag/category
- How to get WooCommerce Product Categories and its children’s children?
- How to hook into creating a category?
- Media Library Category Exclude Tree
- When category name and title are the same … WP will select archive.php instead of single.php
- How to display child-category PAGES on a category page
- How get all media from a posts category by db?
- Cant get unique_array() work on get_the_category() foreach loop
- Show One Level Category id
- get_categories returns top-level categories instead of child categories
- Show posts from all categories
- DESC order not working when showing only child categories
- Search tag within category
- How to create category page
- Exclude Category From Home Page, Display Posts on It’s Own Page?
- Custom WordPress category page showing all posts rather than the specified category
- How to get child category list post in one template?
- i want to add pagination list of categories
- Woocommerce custom taxonomy order
- Update wordpress menu with woocommerce products
- AZ Directory posts directory index
- How to remove category and other tags from posts page