Init hook function to call other hook in function.php

perhaps running it on the user_register hook? add_action( ‘user_register’, ‘loadAfterUserRegistrationHook’ ); function loadAfterUserRegistrationHook(){ add_action( ‘user_meta_after_user_register’, ‘createNewPost’ ); } See: http://codex.wordpress.org/Plugin_API/Action_Reference/register_form

WordPress ignore init for crawlers

Just added this to functions.php: // Returns TRUE if it’s a crawler function check_is_crawler() { if (isset($_SERVER[‘HTTP_USER_AGENT’]) && preg_match(‘/bot|wget|crawl|google|slurp|spider/i’, $_SERVER[‘HTTP_USER_AGENT’])) { return true; } else { return false; } } And I’m using it on critical functions to lower resource usage. Also, created a robots.txt with the following content: User-agent: * Crawl-delay: 10 It puts … Read more

What is the entry point of a WordPress theme?

The active theme’s functions.php is the first theme file loaded, in the file wp-settings.php. All other theme files are loaded depending on the context of the request, which happens very late in the load process, after the user is authenticated, the request is parsed, and the query runs. Templates are for display, nothing belongs in … Read more

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