Author: Marcin Pietrzak

Simple SEO Improvements

Are you bored with heavy-load all-in-one plugins? And you need only simple SEO improvements?

If yes, I have something for you – small, light and fast – WordPress plugin for SEO Improvements:

Simple SEO Improvements

Try it now!

Set “meta robots” for pages, posts and custom post types – force globally or set per entry.

Add “meta description” for your content.

Add user admin with password admin

When I test client sites I need to re-create this site on my local machine. I often use Duplicator plugin to get full backup of client site with files and database dump. I need a login to WordPress too. Sometimes client create a login for me, but sometimes not.

This is a code which allow to change password for user “admin” or create the user “admin” with password “admin”.

require 'wp-load.php';
$admin = get_user_by( 'login', 'admin' );
if ( !empty( $admin ) ) {
    wp_set_password( 'admin', $admin->ID );
    echo 'New password "admin" for user "admin" was set.';
    return;
}
$admin_id = wp_create_user( 'admin', 'admin', sprintf( 'admin-%d@example.com', rand() ) );
$admin = new WP_User( $admin_id );
$admin->add_role( 'administrator' );
echo 'New user "admin" with password "admin" was created.';

How to use it?

Copy this file to root directory of your WordPress and enter URL in to browser. Remember to delete this file after you create a user.

And never use this on live sites.

[zip href="http://iworks.pl/wp-content/uploads/2016/02/iworks-set-admin.zip" lang="en"]iworks-set-admin.zip[/zip]

How add number of entries in “At a Glance” dashboard widget in Types?

It is pretty easy.

First step: Tick “Show number of entries on “At a Glance” admin widget.” in “Visiblity” box when you edit Custom Post Type:

types-edit-post-type-at-a-glance

And it is done!:

types-entries-on-at-a-glance-widget

How to choose custom field on entries list in Types?

This is pretty easy.

All what you need is made those three steps:

1. Add custom fields.

First you must add custom fields to selected post type or custom post type. Then go to Types -> Custom Fields and add a group with few fields. I added CPT “Clan” and group “Clan Data” and two fields “:

  1. “Since” – as a data field
  2. “Select field” – as a select

Custom Fields group with fields

2. Tick selected Custom Field(s).

After you successfully add a custom fields, go to custom post type edit screen and choose which custom fields should be displayed on entry list.

Edit Custom Post screen

3. Check it on list

Last step: check it on entries list.

Custom Post entries list

Powered by WordPress & Theme by Anders Norén