Forum Replies Created

Viewing 1 replies (of 1 total)
  • To all—

    When you have pretty permalinks on, get_category_link will take a category object (returned by get_the_category), but when you have it off, get_category_link will only take a category id.

    Also it seems not to want to accept the term_id in the form of the object property ($category->term_id). I’ve had to first set it to a variable $term_id = $category->term_id, and then pass the variable into the function ($term_id).

    Its pretty easily resolvable on the user end–ust make sure to always pass it a term_id–but its pretty strange behavior for WordPress.

    It probably has to do with certain environment variables not being set up right when the permalink redirect rules are left out.

Viewing 1 replies (of 1 total)