Overriding Gallery Margin

The simplest method is to remove the WordPress-injected inline style definitions, so that you can control style completely via the Theme: /** * Remove default gallery shortcode inline styles */ add_filter( ‘use_default_gallery_style’, ‘__return_false’ ); Note that this will remove ALL WordPress-injected gallery CSS definitions, so you may need to port some of the original style … Read more

Hiding certain panels in dashboard

@joesk isn’t quite correct. If you simply want to hide a meta box or two on the post-editing screen, you can do that via the Screen Options tab at the top of most screens. If it’s not aesthetic to your personal preferences and you’d like to remove the ability to edit the Excerpt at all, … Read more

How can I insert HTML attributes with an existing TinyMCE button?

The following workaround is based on the wpeditimage/plugin.js file in the core. You could enqueue it or test it with: add_action( ‘admin_footer-post.php’, function() {?><script> jQuery(window).load( function( $ ) { if( ! $( “#wp-content-wrap”).hasClass(“tmce-active” ) ) return; var editor = tinyMCE.activeEditor; editor.on( ‘BeforeExecCommand’, function( event ) { var node, DL, cmd = event.command; if ( cmd … Read more

Get parent category class in post_class()

Perhaps something like: function mytheme_get_post_class_parent_cats() { $parent_cat_classes = array(); // Get parent categories $post_cats = wp_get_post_categories(); // Loop through post categories foreach ( $post_cats as $post_cat ) { $cat_parents = get_category_parents( $post_cat , false, ‘,’, true ); // if there are any parent categories if ( $cat_parents ) { // create an array $cat_array = … Read more

How to implement different color schemes in your themes

I would put all the common css in the theme’s style.css, and create separate stylesheets for the color options. I would also put color options in their own folder with the images for that style. This way you can keep the filenames the same between color options to make maintaining the code a little easier. … Read more

How to Add Admin Bar and Admin Menu or Submenu Notification Bubbles?

You just create the bubble (circle) with CSS, and have text site on top of it. Example CSS span.mbe-update-bubble{ position: absolute !important; top: 6px !important; left: 6px !important; -webkit-border-radius: 10px !important; -khtml-border-radius: 10px !important; -moz-border-radius: 10px !important; border-radius: 10px !important; background: #ccc !important; color: #464646 !important; width: 10px !important; height: 10px !important; padding: 3px !important; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)