WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I have some taxonomies to always have "the most used tags" displayed when a new post is being created.


share|improve this question
up vote 2 down vote accepted

There does not appear to be any way to hook into that from inside PHP


So JavaScript will probably best suit as a quick and easy solution.

add_action( 'admin_footer-post-new.php', 'wpse_45149_inject_script' );
function wpse_45149_inject_script() {

    $expand_for = array( 'post_tag' ); // add taxonomy names here

    // build a nice jQuery query
    foreach ( $expand_for as &$tax_name ) $tax_name = '#link-'.$tax_name;
    $expand_for = implode( ',', $expand_for );

        <script type="text/javascript">
            jQuery(document).ready(function() {
                jQuery('<?php echo $expand_for; ?>').click();


You should probably wp_enqueue_script this script instead (always set position to "footer"). And also hook to the edit.php pages if necessary. Moreover, $expanded_for should probably be escaped.

share|improve this answer
Thanks a lot, exactly what I need :) – KumZ Mar 11 '12 at 12:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.