wordpress admin plugin menu custom css

Use the admin_head hook and just echo out what you need to: function my_admin_head() { // Custom Style echo ‘<link rel=”stylesheet” href=”‘.WP_PLUGIN_DIR.’/style.css” type=”text/css” />’; // Our JS echo ‘<script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js”></script>’; } add_action(‘admin_head’, ‘my_admin_head’);

Using jquery and javascript in WordPress

Well first off you have way to many duplicate js files, I see at a glance 3 calls to the same jQuery in 3 separate urls, there are also other duplications (easing) and probably more that I missed, clean this up. Secondly your not using jQuery tools properly, the javascript calls for a tab and … Read more

Search input area autogrow – how?

they’re using CSS3 transitions. <style type=”text/css”> #s { float: right; -webkit-transition-duration: 400ms; -webkit-transition-property: width, background; -webkit-transition-timing-function: ease; -moz-transition-duration: 400ms; -moz-transition-property: width, background; -moz-transition-timing-function: ease; -o-transition-duration: 400ms; -o-transition-property: width, background; -o-transition-timing-function: ease; width: 72px; } #s:focus { background-color: #f9f9f9; width: 196px; } </style> <input type=”text” class=”field” name=”s” id=”s” placeholder=”Search”>

Properly embed javascript into WP (using function.php) – doesn’t work?

By default, the jQuery script is loaded in no conflict mode. I noticed that you have in you header.php the following code: <script type=”text/javascript” src=”https://wordpress.stackexchange.com/questions/27986/<?php bloginfo(“template_directory’); ?>/js/jquery-1.4.2.min.js”></script> Adding jQuery like this, will override (if the page works) the wp_enqueue_script(‘jquery’). If you load jQuery like this, you need to activate the noConflict mode, as explained here. … Read more

jQuery UI Tools (Flowplayer) Issues

If it doesn’t work anyway, what is the harm of trying to do it right way? You do not use wp_enqueue_script() for most of scripts. You should. Loading two copies of jQuery is wrong. The fact that trying to fix it breaks something does not make it less wrong. From quick look you have a … Read more

How to execute a plugin on a single page only?

WordPress has a built-in function called wp_enqueue_script() which will allow a certain piece of JavaScript to be included in a page. If you’d just like to see that script on a particular page, you can conditionally call it from the theme file. For example: <?php if (is_page(‘home’)) { wp_register_script(‘custom_script’, get_template_directory_uri() . ‘/js/custom_script.js’); wp_enqueue_script(‘custom_script’); } ?> … Read more