Multiple files in a plugin
This happens only if you call a file per HTTP without loading WordPress. That is something you should never do, because the plugin URL might be another domains where cookies don’t work anymore.
This happens only if you call a file per HTTP without loading WordPress. That is something you should never do, because the plugin URL might be another domains where cookies don’t work anymore.
You’re probably calling the function before it’s defined – why not hook into it? Something like: function someFunction() { require( ‘/full/path/to/wp-blog-header.php’ ); } add_action(‘some_hook’, ‘someFunction’); Note: You might try the plugins_loaded hook.
This is to extend your own answer: It appears that when “hierarchical” is set to true, each post behaves like a page. I am quoting here so I don’t really understand why it matters but changing this line remove the problem. Here is what the codex says about the hierarchical parameter hierarchical (boolean) (optional) Whether … Read more
I would say you are probably receiving a WP_Error on first run. around the $maxitems and $rss_items lines, add: if( ! is_wp_error( $rss ) ) { $maxitems = $rss->get_item_quantity(3); $rss_items = $rss->get_items(0, $maxitems); } As seen in the example.
Your tryout.php has a posts loop in it, and you’re calling that file inside another loop. Loops squared. I expect your content is not actually structured in this way?
Can’t access my WP dashboard: fatal error? [closed]
There is no reference to ‘classes.php’ anywhere in the WP codebase, either in the 3.1 branch or in trunk. You probably have a modified version. Do a ‘svn stat’ and then a ‘svn diff’.
A white screen of death is typically a fatal PHP error, most of the time due to a syntax error. This often sends no errors to the browser. Some things you can do: Turn on PHP error_log in your php.ini file and set the error_reporting levels. http://php.net/manual/en/errorfunc.configuration.php Error info: http://www.php.net/manual/en/errorfunc.constants.php Alternatively or in combination you … Read more
There’s not one if you didn’t set one up. The codex has a good example of how to do this. <?php @ini_set(‘log_errors’,’On’); @ini_set(‘display_errors’,’Off’); @ini_set(‘error_log’,’/home/example.com/logs/php_error.log’); /** * This will log all errors notices and warnings to a file called debug.log in * wp-content (if Apache does not have write permission, you may need to create * … Read more
I get that answer. I go to this file: wp-includes/deprecated.php and find this line in (deprecated) wp_get_http() function: @set_time_limit ( 60 ); just comment out this line and it works fine. Because wordpress hard coded that 60 seconds limit, this hard coded setting was over-ridding my php.ini settings. so I comment out that line, my … Read more