WordPress.org

Ready to get started?Download WordPress

Forums

wp-admin: overwrite html without changing core? (6 posts)

  1. mYrAn
    Member
    Posted 3 years ago #

    Hi!

    Ive designed a new adminpanel for my site, and im just about to start coding it. But then i read in the codex, that you only can change the css of the adminpanel. I need to change the html for the design to work. Is there a way of doing this, in a plugin, without changing the core and have my design rewritten on every update? Or have i just spent the night doing this in vain? :(

    Thanks in advance!

  2. jocken
    Member
    Posted 3 years ago #

    There are no good tutorials out there but you can start reading about add_filter and use the plugin adminimize.

    You'll probably know this but html is just a way of boxing items on a page in a semantic way. All the styling is done with css, you can just use "display: none" on items you don't need.

    Create a plugin or use the functions.php to add the custom css. You can also use jquery for changing html, for example, changing dropdown-boxes to radiobuttons etc. Put all of it in your theme.

    There are no good guides or easy ways for this task.

  3. mYrAn
    Member
    Posted 3 years ago #

    Yes, but the problem is that i need to change the actual markup of the page, and that cant be done with only css :<

  4. jocken
    Member
    Posted 3 years ago #

    Then jquery is your solution.

  5. mYrAn
    Member
    Posted 3 years ago #

    And how would one go about doing that? Cant find any tutorials :<

  6. jocken
    Member
    Posted 3 years ago #

    add_action( 'admin_footer', 'catlist2radio' );
    function catlist2radio(){
    	echo '<script type="text/javascript">';
    	echo 'jQuery("#typdiv .categorychecklist input, #argangdiv .categorychecklist input, #landdiv .categorychecklist input, #producentdiv .categorychecklist input")';
    	echo '.each(function(){this.type="radio"});</script>';
    }

    For example: I use this code to change my custom taxonomies checkboxes to radiobuttons.

Topic Closed

This topic has been closed to new replies.

About this Topic