Title: $post == NULL when using category base
Last modified: August 19, 2016

---

# $post == NULL when using category base

 *  [tosak](https://wordpress.org/support/users/tosak/)
 * (@tosak)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/post-null-when-using-category-post/)
 * Hello!
 * I have a post which is a child of a category, which is a child of another category,
   so the URL is something like this:
    `http//:domain.tld/categorybase/category/
   category/post`
 * However, the $post variable is NULL here for some reason.. the_ID() etc. returns
   NULL as well.
 * If I remove the category base from the URL everything works as expected.
 * What am I doing wrong? Is it possible to get the_permalink without the category
   base?
 * Thanks in advance!

The topic ‘$post == NULL when using category base’ is closed to new replies.

## Tags

 * [category-base](https://wordpress.org/support/topic-tag/category-base/)
 * [NULL](https://wordpress.org/support/topic-tag/null/)
 * [post](https://wordpress.org/support/topic-tag/post/)
 * [url](https://wordpress.org/support/topic-tag/url/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [tosak](https://wordpress.org/support/users/tosak/)
 * Last activity: [16 years, 3 months ago](https://wordpress.org/support/topic/post-null-when-using-category-post/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
