Viewing 3 replies - 1 through 3 (of 3 total)
  • This error means that your custom post type is trying to call some WordPress core function, but is either not doing it the right way, or it’s giving it osme ort of invalid data and is returning an error.

    To see what the problem is. try this code:

    echo “

    ";
    var_export ($my_var_name);
    echo "

    “;

    What this will do is tell you what the actual error that you are getting is, and that will let you go and fix it.

    It is hard to know where to place it though. If you turn on debug mode in your wp-config.php file you will probably see a lot more detail on where the error is in your code and that should help you find where this needs to go.

    Thread Starter madbird

    (@madbird)

    Thx Michael but is there another way of fixing this – I have no idea how to use the code above!

    There’s a lot of ways that you can do it, but in the end it all comes down to being just you taking steps to debug your own code. That is something that you will have to learn – because you will always get issues like this.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal error when viewing custom post type’ is closed to new replies.