10 WordPress Tips and tricks to help you manage your blog

I think it is a common way of opening a WordPress blog. I'm going to invent something new, but I have to say that these tips and tricks curated specifically have been designed especially for your WordPress blog help you manage a more effective.

Tips and tricks to help you manage your blog 


I work with WordPress from several years ago, I started several websites successfully, and have more money from my website on WordPress, I have another task until now. It is, of course, a great platform, by mistake is fully functional and ready for we can stop code snippets, tips, and tricks to optimize our workflow.

(Self) hosted WordPress Project has a website separately, which is known as Codex WordPress. It is a game for children, Starkelsen hosts all the information on the technical aspects of WordPress, including configurations, previews code, and much more. The learning and you will learn of the codex plugin for WordPress. It is more than just a platform to push the button "publish", is the time, the use of this energy.

Even the project passes slowly. The new version of WordPress 3.9 'Smith' to some things like post brilliant replaces editor and additional functions for the management of your media files. But there is no doubt that further improvement, and perhaps we can use this type and tricks to imitate.

Themes WP instruments of standardization

GitHub is a project is the theme of WordPress standardize in square brackets.

Shorten EXIF metadata from images

You can do this by mistake, but the output can make good use of the extract following code formatted correctly in a reading of EXIF data.

< ?php
function plugin_get_attachment_image_meta( $id )
{
  $meta = wp_get_attachment_metadata( $id );
  if( is_array( $meta ) && isset( $meta['image_meta'] ) )
  {
    $meta = $meta['image_meta'];
    if( isset( $meta['focal_length'] ) && !empty( $meta['focal_length'] ) )
    {
      $meta['focal_length'] = $meta['focal_length'] . 'mm';
    }
    if( isset( $meta['shutter_speed'] ) && !empty( $meta['shutter_speed'] ) )
    {
      $meta['shutter_speed'] = '1/' . absint( 1.0 / floatval( $meta['shutter_speed'] ) ) . 's';
    }
    if( isset( $meta['aperture'] ) && !empty( $meta['aperture'] ) )
    {
      $meta['aperture'] = sprintf( 'f%.1f', $meta['aperture'] );
    }
    if( isset( $meta['iso'] ) && !empty( $meta['iso'] ) )
    {
      $meta['iso'] = 'ISO' . $meta['iso'];
    }
    return $meta;
  }
  return null;
}

The validation of the origin of the images

If you play a lot with WordPress, probably the images by accident or because you have removed the wrong plugin used at a bad time. By this script, you can analyze your database and uploads subdirectory along falls with images, are absent.

We have never really think about these things, but sometimes applies a control fast, just to see what we do so well.

The header information standard for flooring

Admit it, you probably treated his own version of this at least a couple of times and without a doubt not only for WordPress but your own projects. It is always nice to use what others use so that you can use a model for your next WordPress theme you are going to develop.

/*
Theme Name: [theme]
Author: [author]
Author URI: [url]
Theme URI: [theme-url]
Version: [ver]
Description: [theme-name] - [description]
Copyright: [(c) (year) (company)]
License: [license]
License URI: [license-url]
Tags: [tag1, tag2, tag3]
*/
Of course, you will not be able to remove the brackets [].

How to change the HTTP Content-Type header in WordPress (LED)

function changeHeaders($headers)
{
    $headers['Content-Type'] = 'application/json; charset=utf-8';

    return $headers;     
}
add_filter('wp_headers', 'changeHeaders');

Hide information to the public of WordPress

Are carefully your own blog and we do not want all the same snooping around and treat your creation you can copy the following script on the functions.php file, deletes all "gifts" of the data source, "Before" avoid learn what place is based.

remove_action('wp_head', 'wp_generator');

function disable_our_feeds() {
    wp_die( __('Error: No RSS Feed Available, Please visit our homepage.') );
}

add_action('do_feed', 'disable_our_feeds', 1);
add_action('do_feed_rdf', 'disable_our_feeds', 1);
add_action('do_feed_rss', 'disable_our_feeds', 1);
add_action('do_feed_rss2', 'disable_our_feeds', 1);
add_action('do_feed_atom', 'disable_our_feeds', 1);

function roots_head_cleanup() {
  remove_action('wp_head', 'feed_links', 2);
  remove_action('wp_head', 'feed_links_extra', 3);
  remove_action('wp_head', 'rsd_link');
  remove_action('wp_head', 'wlwmanifest_link');
  remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
  remove_action('wp_head', 'wp_generator');
  remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);

  //Remove Header Stuffs
    // remove junk from head
    remove_action('wp_head', 'index_rel_link');
    remove_action('wp_head', 'feed_links_extra', 3);
    remove_action('wp_head', 'start_post_rel_link', 10, 0);
    remove_action('wp_head', 'parent_post_rel_link', 10, 0);
    remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);

  global $wp_widget_factory;
  remove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style'));

  add_filter('use_default_gallery_style', '__return_null');
}
add_action('init', 'roots_head_cleanup');

The linguistic services Parent other Post in WordPress

add_action('admin_menu', function() {
    remove_meta_box('pageparentdiv', 'chapter', 'normal');
});
add_action('add_meta_boxes', function() {
    add_meta_box('chapter-parent', 'Part', 'chapter_attributes_meta_box', 'chapter', 'side', 'high');
});

function chapter_attributes_meta_box($post) {
    $post_type_object = get_post_type_object($post->post_type);
    if ( $post_type_object->hierarchical ) {
        $pages = wp_dropdown_pages(array('post_type' => 'part', 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column'=> 'menu_order, post_title', 'echo' => 0));
        if ( ! empty($pages) ) {
            echo $pages;
        } // end empty pages check
    } // end hierarchical check.
}

The creation of the labor type of mailbox

function codex_custom_init() {
  $labels = array(
    'name' => 'Books',
    'singular_name' => 'Book',
    'add_new' => 'Add New',
    'add_new_item' => 'Add New Book',
    'edit_item' => 'Edit Book',
    'new_item' => 'New Book',
    'all_items' => 'All Books',
    'view_item' => 'View Book',
    'search_items' => 'Search Books',
    'not_found' =>  'No books found',
    'not_found_in_trash' => 'No books found in Trash', 
    'parent_item_colon' => '',
    'menu_name' => 'Books'
  );

  $args = array(
    'labels' => $labels,
    'public' => true,
    'publicly_queryable' => true,
    'show_ui' => true, 
    'show_in_menu' => true, 
    'query_var' => true,
    'rewrite' => array( 'slug' => 'book' ),
    'capability_type' => 'post',
    'has_archive' => true, 
    'hierarchical' => false,
    'menu_position' => null,
    'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )
  ); 

  register_post_type( 'book', $args );
}
add_action( 'init', 'codex_custom_init' );

How to disable the automatic update of WordPress

If for any reason you don't like the fact that updates automatic WordPress You can use some of your things as a result of some fragments, snippets for automatic updates for good. Although it is not recommended, as the safety precautions, some trains before working with these in one-half of the field.

//Disable Theme Updates # 3.0+
remove_action( 'load-update-core.php', 'wp_update_themes' );
add_filter( 'pre_site_transient_update_themes', create_function( '$a', "return null;" ) );
wp_clear_scheduled_hook( 'wp_update_themes' );
Disable Plugin Updates #3.0+

//Disable Plugin Updates #3.0+
remove_action( 'load-update-core.php', 'wp_update_plugins' );
add_filter( 'pre_site_transient_update_plugins', create_function( '$a', "return null;" ) );
wp_clear_scheduled_hook( 'wp_update_plugins' );
Diasable Core Updates # 3.0+

//Diasable Core Updates # 3.0+
add_filter( 'pre_site_transient_update_core', create_function( '$a', "return null;" ) );
wp_clear_scheduled_hook( 'wp_version_check' );
This need is defined in the file functions.php.

Current address of the URL column of the image in the media management

This should also be because of the file in the Office. The time savings do not have to make each image individually on the conclusions of your URL.

function muc_column( $cols ) {
        $cols["media_url"] = "URL";
        return $cols;
}
function muc_value( $column_name, $id ) {
        if ( $column_name == "media_url" ) echo '';
}
add_filter( 'manage_media_columns', 'muc_column' );
add_action( 'manage_media_custom_column', 'muc_value', 10, 2 );

WordPress Tips and tricks to help you manage your blog

I am standing off to the side, and most offer some functionality enables you to gain time, what I have always sought. If you want more and a more detailed explanation of these tips and tricks to create a comment and I will do everything better.

Show Popular Posts

Best Software to share your Affiliate links to others Website: Number one way to sell your products and share your affiliate links!

Hindu baby names wonder full collection , are you searching baby names in Tamil.

Commercial - JZP RANKREEL by ABHI DWIVEDI Comment: A breakthrough all-in-one CLOUD APP THAT PUTS THEIR VIDEOS IN FRONT OF THOUSANDS OF PREMISES AND CUSTOMERS ONLINE FOR FREE and without advertising or know anything about SEO.