WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] get_cat_ID($category_name) works on pages with page_id, but not cat_id url's

[Resolved] get_cat_ID($category_name) works on pages with page_id, but not cat_id url's

  • get_cat_ID($category_name) works on pages with page_id, but not cat_id url’s. For example, when using the function get_cat_ID($category_name) in the template. If I use that template with the functions for a page like http://url/?cat=6, it does not work, but http://url/?page_id=6 works. Any suggestions? Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • how do you set $category_name ?

    what is the full code of the template?

    Hi, sorry :(, my fault was lying somewhere else, it was a small mistake I have made that made me look to deep for the answer. Thanks, the problem is solved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] get_cat_ID($category_name) works on pages with page_id, but not cat_id url's’ is closed to new replies.
Skip to toolbar