How do the default themes reference style.css?

The stylesheet is registered and enqueued by a function called twentyfourteen_scripts() in the theme’s functions.php. Callbacks hooked into the style loader/dependency system will be echoed on the wp_head action in the wp_head() function. Which, by the way, is how you should be loading your own stylesheets. There is a similar system for scripts.

An echo line in a transition_post_status action leads to “cannot modify header information – headers already sent by”

The error message you are seeing is normal for that operation. By the time the transition_post_status hook fires, the HTTP page headers is already sent. By simply echoing an error message inside a hook like transition_post_status which was never intended to echo any output to the browser, as you did, you are actually trying to … Read more

Authenticate a user for current request

Yes, you can hook determine_current_user. This is how WordPress calls the existing code that processes authentication cookies: add_filter( ‘determine_current_user’, ‘wp_validate_auth_cookie’ ); add_filter( ‘determine_current_user’, ‘wp_validate_logged_in_cookie’, 20 ); e.g. see the implementations of those in wp-includes/pluggable.php. Your filter should return the user ID of the user you want to authenticate as once you’ve processed the headers. That … Read more

adding meta data using plugin to top of head

Okay, here’s the answer: function CustomHead() { include(‘headcontent.php’); } add_action(‘wp_head’,’CustomHead’,1,1); The key is that first “1”, which sets the priority of it to run at the highest (this is an optional element, defaulting to 10, putting it at the end of the head by default). More info here: http://codex.wordpress.org/Function_Reference/add_action

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)