WordPress Essentials

Reset Admin Password Through FTP

1. Log in to your site through FTP and open functions.php.
2. Add this code at the beginning, after the first <?php:

wp_set_password( ‘password’, 1 );

3. Enter a new password for the main admin user. “1” is the user ID number.
4.Remove this code or it will reset your password every time you try to log in.

Basic WordPress .htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

Robot.txt For WordPress

User-agent: *
Disallow: /cgi-bin/
Disallow: /wp-admin/
Disallow: /wp-includes/
Disallow: /wp-content/plugins/
Disallow: /wp-content/cache/
Disallow: /wp-content/themes/
Disallow: /wp-login.php
Disallow: /wp-register.php

Child Theme

Not quite shortcode but, do yourself right when working with WordPress and make a
child theme before you do anything to modify your WordPress CSS. This will keep your custom CSS in a separate folder that will not be affected when you update the theme. For this illustration we will reference the Twenty Eleven theme.

  1. Go into your installed WordPress and make a folder in /wp-content/themes/ and name it something that relates to your theme, maybe “childof2011theme” if you are using the Twenty Eleven Theme that comes with WordPress.
  2. Create a new text file and name it style.css, then copy and paste the following: /* Theme Name: Twenty Eleven Child Theme URI: http://your_url.com/ Description: Child theme for the Twenty Eleven theme Author: Your Name Author URI: http://your_url.com/ Template: twentyeleven Version: 0.1.0 */ @import url(“../twentyeleven/style.css”);
  3. The last line, @import url(“../your _theme/style.css”); is the most important part of making a child theme. Change “your _theme” to match the name of the theme that you are making a child.
  4. Log into your WordPress Dashboard and go to Appearance → Themes
  5. Activate your child theme, in this case named “Twenty Eleven Child”

Gallery Size And Order Shortcode

If you need your WordPress gallery to display images full size use this shortcode. Change the xxx to the your desired image Attachment ID which can be found in the Media Library for each image. This works well if you have animated and / or transparent GIFs because as of WordPress 3.5 thumbnails of GIFs do not retain transparency nor will they animate.

/* BEWARE */
[gallery size=”full” ids=”xxx,xxx,xxx”]

[gallery orderby=”title” order=”ASC” ids=”xxx,xxx,xxx”]

[gallery orderby=”title” order=”DESC” ids=”xxx,xxx,xxx”]

[gallery orderby=”ID”]

[gallery columns=”3″]

[gallery size=”medium”]

Valid values include “thumbnail”, “medium”, “large”, “full”

Turn Off WordPress Home Page Title

.home .entry-title { display: none; }