How do I force wp_enqueue_scripts to load at the END of ?

I think the more WordPress friendly way to do this is to use wp_enqueue_styles()‘s $deps parameter. Assuming the plugin styles are enqueued via wp_enqueue_styles() (which, admittedly, pathetically few are), you list an array of the stylesheet handles that your styles depend on and then they load afterwards.

How do I add a search bar to my header?

Just add to your theme this code: <?php get_search_form(); ?> This code will echoing search form so place it everywhere where you want to have the search form. Further you need to have search.php file in your theme which will show the search results. You can use ordinary WP loop in the file.

Auto get_header and get_footer on every template?

Looking at wp-includes/template-loader.php … there seems to be a way: if ( $template = apply_filters( ‘template_include’, $template ) ) include( $template ); You could hook into that filter, handle the including in a callback function and return FALSE. Sample code, not tested: add_filter( ‘template_include’, function( $template ) { get_header(); include $template; get_footer(); return FALSE; });

Disable h1 and h2 from rich text editor combobox

you can change lots of things about the tinyMCE editor at the tiny_mce_before_init filter. http://codex.wordpress.org/TinyMCE_Custom_Buttons the following will restrict your blockformats to p,h3,h4 and blockquote function wpa_45815($arr){ $arr[‘theme_advanced_blockformats’] = ‘p,h3,h4,blockquote’; return $arr; } add_filter(‘tiny_mce_before_init’, ‘wpa_45815’); EDIT for WordPress 3.9 see link function wpa_45815($arr){ $arr[‘block_formats’] = ‘Paragraph=p;Heading 3=h3;Heading 4=h4’; return $arr; } add_filter(‘tiny_mce_before_init’, ‘wpa_45815’);

disable wordpress canonical tag meta

found solution: before wp_head() command, insert: remove_action(‘wp_head’, ‘rel_canonical’); p.s. if generator meta tag is being added from elsewhere (i.e. from theme or plugin, rather than wp-core) and was priority other than 10, then you might need to put the exact priority, as is was given from that theme/plugin: i.e. remove_action(‘wp_head’, ‘rel_canonical’, 47);

Adding javascript to child theme

You should enqueue the script in child theme’s functions.php. for example if name of the js file is custom.js and if you place it under js folder in your child theme, then in functions.php you should add function my_custom_scripts() { wp_enqueue_script( ‘custom-js’, get_stylesheet_directory_uri() . ‘/js/custom.js’, array( ‘jquery’ ),”,true ); } add_action( ‘wp_enqueue_scripts’, ‘my_custom_scripts’ ); Here … Read more

Is there a way to enable Cross-Origin Resource Sharing for WordPress’ ajaxurl?

Milo is correct. For instance, go to your theme’s functions.php file, and add the following: add_filter( ‘allowed_http_origins’, ‘add_allowed_origins’ ); function add_allowed_origins( $origins ) { $origins[] = ‘https://site1.example.com’; $origins[] = ‘https://site2.example.com’; return $origins; } Now an ajax call from https://site1.example.com to your site’s ajax url will have the appropriate Access-Control-Allow-Origin header in the response. eg. $.ajax({ … Read more

How to remove rest api link: in http headers?

The output is generated by the rest_output_link_header(). This function is used in two actions, wp_head and template_redirect in default-filters.php:@line234. You can remove the function from those hooks to remove the output you wanted to remove. Put the following codes in your theme’s functions.php to achieve the desired result. remove_action( ‘wp_head’, ‘rest_output_link_wp_head’, 10); remove_action( ‘template_redirect’, ‘rest_output_link_header’, … Read more