Tag Info

New answers tagged

2

Technically styles should only be output in head and outputting them elsewhere is invalid HTML (browsers are however very lax about it and don't care much). So in best interest of standards WordPress wouldn't do something like that. Right? Right!? It does without bit of remorse actually. There is print_late_styles() function, running in footer that will ...


0

You will have to use wp_footer action for that. And check your pages in functions itself to perform some specific tasks. something like this. function my_footer_function() { if ( is_page( 1032 ) ) { // Do this } elseif ( is_page( 1033 ) ) { // Do that } else { // Do something else or nothing } } add_action( 'wp_footer', ...


0

First, create a static js file with those inline codes.. !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0]; if(!d.getElementById(id)){js=d.createElement(s);js.id=id; js.src="//platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js,fjs);} }(document,"script","twitter-wjs"); var options = { "url": "/my-styles.css" }; ...


0

Following code can be used to add script in footer BUT I should mention here that this is not the recommended way in WordPress. add_action( 'wp_footer', 'custom_footer_script', 100 ); function custom_footer_script(){ ?> <script> // your script </script> <?php } Alternative: Have to tried creating separate script file adding ...


0

add_action( 'wp_enqueue_scripts', 'load_scripts '); function load_scripts() { if ( !is_admin() ) { wp_enqueue_script( 'jquery' ); wp_register_script( 'twitter-customize', get_bloginfo( 'template_directory' ) .'/js/customize-twitter-1.1.min.js', array( 'jquery' ), '1.0', true ); wp_enqueue_script( 'twitter-customize' ); } ...


1

This works for me: <?php /** Plugin Name: Admin Footer Text Remover **/ add_filter( 'admin_footer_text', '__return_empty_string', 11 ); add_filter( 'update_footer', '__return_empty_string', 11 ); where I use the __return_empty_string function as a callback.



Top 50 recent answers are included