Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#10843 closed feature request (wontfix)

bloginfo('tag_url') and bloginfo('category_url')

Reported by: prometh Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.8.4
Component: General Keywords: reporter-feedback bloginfo tag_base category_base
Focuses: Cc:


It's such a pain having to work with get_option('tag_base') and get_option('category_base').

Especially when the posts page has been assigned to a static page, you need to switch from appending bloginfo('url') to using get_permalink(get_option('page_for_posts')).

It'd be so much easier (and compatible) if we had a 'tag_url' and 'category_url'

Change History (3)

#1 @scribu
12 years ago

  • Keywords reporter-feedback added; url removed

'tag_url' is very vague and I don't see the benefit of using bloginfo('tag_url') over get_option('tag_base'). The same for 'category_url'.

And I don't see how it would help with get_permalink(get_option('page_for_posts')).

Please be more descriptive when creating tickets.

#2 @prometh
12 years ago

Did you read what I said about assigning the posts_page to a static page?

Please be more observant when reading tickets.

#3 @dd32
12 years ago

  • Milestone Unassigned deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Did you read what I said about assigning the posts_page to a static page?

Probably skiped over it, Since its incorrect.

When a static page is used for posts, The category and tag bases stay the same. if the blog is at /wordpress/blog/ category pages are /wordpress/category/some-cat/.

This can be changed by the WordPress user on the Permalinks page by setting the category base to 'blog/category'

That being said.. You shouldnt ever have to manually generate a category url.. You should always use the API to do it instead, The simple reason is to make it more portable between blogs using "Pretty Permalinks" and those using ?cat=something.

get_category_link($cat_id) is the function to use (Make sure to check for a WP_Error return on that function though in the case that the category doesn't exist)

I'm closing as wontfix due to the fact you shouldnt have to make the link directly, There being an API available, and your second point being moot.

Note: See TracTickets for help on using tickets.