Support » Plugins » Creating plugin: Cant find wp-blog-header …

  • Warning: main(./wp-blog-header.php): failed to open stream: No such file or directory in /usr/home/xerocool/domains/ on line 30


    What am I doing wrong? I did include, require, etc to retrieve the titles of posts, and links. so whats wrong?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You probably have a better feel than me but here’s related post:

    No. Thats nothing that has to do with it. This is for a plugin….

    The path to the “require”d files are to be calculated respective to the directory from which the “require” is made, which will be wp-content/plugins.

    So, use absolute paths, or use some way to ensure that the path is right. There are some variables that are set to enable this to happen in an easier fashion. Compare with how others do it for best results

    Unless you’re doing something unusual in your plugin, you shouldn’t need wp-blog-header.php; plugins run in WordPress’ space, so they should already have access to what functionality is found in that script. But if you truly must include the file in your plugin, make sure to pass WP’s ABSPATH constant as part of your path:

    require(ABSPATH . 'wp-blog-header.php');

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Creating plugin: Cant find wp-blog-header …’ is closed to new replies.