Support » Fixing WordPress » php include not working on child theme

  • jepser


    I’m coding a child theme from a parent theme I created, I want to include php code blocks in order to have specific functionality.

    I call a php file just included in my child theme, it has a loop for a posttype I create. But I’m having this error

    Fatal error: Class 'WP_Query' not found in C:\server\ugalileo\wp-content\themes\galileo-facultades\child-includes\carreras-list.php on line 9

    But when I call it in the parent theme all is okay. The main idea to have a child theme is that it has all parent functionality and its own one.

    Help please,

  • The topic ‘php include not working on child theme’ is closed to new replies.