Enqueuing Script in functions.php vs on the page

Go with functions.php. Use the wp_enqueue_scripts action to call this function, or admin_enqueue_scripts to call it on the admin side. Calling it outside of an action can lead to problems. See #11526 for details. Source: http://codex.wordpress.org/Function_Reference/wp_enqueue_script function themename_load_js() { if ( is_admin() ) { return; } if is_page( 123) { // Replace 123 with your … Read more

Customized wp_new_user_notification

You can only override pluggable functions in a plugin, not via functions.php. The function is already defined when functions.php is loaded, which is why your overriding function is skipped. Move the code to your own plugin to enable it.

Getting RID of thickbox!

I’m guessing front end only, right? function wpse71503_init() { if (!is_admin()) { wp_deregister_style(‘thickbox’); wp_deregister_script(‘thickbox’); } } add_action(‘init’, ‘wpse71503_init’);

Should I ask a theme developer to use locate_template rather than require_once

Generally speaking, Child Themes were originally intended to be able to do two things: Override parent Theme CSS Override parent Theme template files I doubt that the Theme developer intends for the /function-includes/theme-functions.php file to be overridden by a Child Theme. Functional files are usually a core component of the Theme, and allowing a Child … Read more

Function to wrap the_content in a div

You can hook the_content filter. paste below code in functions.php : <?php add_action(‘the_content’,’ravs_content_div’); function ravs_content_div( $content ){ return ‘<div class=”entry-content”>’.$content.'</div>’; } ?> After paste this code in functions.php, the_content() print post/page content after wrap content in div with class entry-content.