Tag Info

Hot answers tagged

5

There's little difference between the files. When you view a WordPress page, the first file called is index.php. And it is, essentially, your "Method 1:" define('WP_USE_THEMES', true); /** Loads the WordPress Environment and Template */ require ('./wp-blog-header.php'); The blog header file (that queues up the rest of WordPress) loads wp-load.php ...


2

You're making something completely wrong. Header comment In your main file, you need the following comment on top (ex. taken from Contact form 7): <?php /* Plugin Name: Contact Form 7 Plugin URI: http://contactform7.com/ Description: Just another contact form plugin. Simple but flexible. Author: Takayuki Miyoshi Author URI: ...


1

There are likely more elegant ways to do this sort of thing, but the quickest and easiest, using your code, would be to move the PHP conditional out of the CSS conditional. e.g. change this: <!--[if lt IE 9]><?php if(is_home() )?> <script type="text/javascript" src="<?php bloginfo('template_url'); ...


1

I think Wordpress is having problem with the url of your external script and throws a 404 error from the handle_404() function in the wp class in /wp-includes/class-wp.php You can try to overcome that using for example status_header(200) <?php define('WP_USE_THEMES', false); require('../wp-blog-header.php'); status_header(200); header('Content-type: ...


1

wp-includes/general-template.php:2102 is the function wp_admin_css(). On the login page this function is called in login_header(). Your theme or some plugin trys to send an HTTP header after that, probably during the actions login_enqueue_scripts or login_head. wp-includes/option.php on:569 is in function wp_user_settings(); a cookie is set here. Cookies ...


1

In the generic case, there is no performant solution other than to check every file and folder that is publicly accessible, and then all the parent folders. Since this is not a feasible or excusable operation to perform on every page load or request, you're left with two other options: Define the location manually, which is not an unreasonable request ...


1

Include wp-load.php, not wp-blog-header.php. Better yet, hook onto the execution of a standard WordPress request and die early. isset( $_GET['my_conditional_check'] ) && add_action( 'plugins_loaded', 'my_xml_output' ); function my_xml_output() { // do my stuff exit; } This'll run WordPress, then my_xml_output(), then die before the request ...



Only top voted, non community-wiki answers of a minimum length are eligible