In the plugin, I create a pagination into categories,
those. http://localhost/?cat=17&paged=5 . The category is known by slug and id.
Is there a way to convert this URL to a custom permalink format,
those. http://localhost/category/foo/page/5 ?
(Suppose we run Wordpress 2.8 / 2.9 +)
Edit: Since there are some misunderstandings regarding what I'm trying to achieve, here is what I have:
- Category id
- Page number (i.e. the fifth page of this category archive)
With this data, I can create the URL of this page, which will be, for example, http://localhost/?cat=17&paged=5 , and this works well. The problem has a visual character: if the user has pretty permanent links, then this does not fit very well. Question: How do I get the correct, fairly permanent link (i.e. http://localhost/category/foo/page/5 ) from (or for) the information I have?
Edit 2: Obviously, if the user has fairly permalinks, then there are no good permalinks. I know this, and actually this is not a question. For now, let's assume that the user has an arbitrary permalink setting. I create a link, and it should look like the user wants.
source share