Notice: Undefined variable: class in /home/improve/public_html/wp-content/themes/themefast-site/header.php on line 25
class="blog ms-guest ms-0">

WordPress Nation


Making WordPress theme building a painless experience

1st plugin

testing wp plugins

WordPress Paths An Easy Reference

One of the most painful parts of working with WordPress Themes is learning how the paths work. So consider this your cheat sheet for Word Press paths.

Use these to determine the path for assets:

<?php echo esc_url( home_url() )?> will give you this path:
//wordpressnation.com

<?php echo get_template_directory_uri(); ?> will give you this path:
//wordpressnation.com/wp-content/themes/themefast-framework-doc

Example: <img src=”<?php echo esc_url( home_url() )?>/images/your-image.png”>
Is the proper way to add your-image.png image in the images directory

Site URL:  <?php esc_url( site_url() )?> This also works <?php esc_url( home_url() )?> but it seems that site is the proper one

Template URL: <?php get_template_directory_uri(); ?>

Plugins URL: <?php plugins_url(); ?>

Admin URL: <?php admin_url(); ?>

Includes URL: <?php includes_url(); ?>

Content URL: <?php content_url(); ?>

 

Uploads Directory:

URLS

URL current upload subdirectory: (based on date): <?php $upload_dir = wp_upload_dir(); $upload_dir[‘url’]; ?>

URL Base upload directory: <?php $upload_dir = wp_upload_dir();$upload_dir[‘baseurl’]; ?>

PATHS

Actual Path to the current subdirectory (based on date): <?php $upload_dir = wp_upload_dir(); $upload_dir[‘path’] ; ?>

Actual Path to base upload directory: <?php $upload_dir = wp_upload_dir(); $upload_dir[‘basedir’]; ?>

Current upload subdirectory only: <?php $upload_dir = wp_upload_dir(); $upload_dir[‘subdir’]; ?>

Current file directory (works on all files- has trailing slash: <?php $path = plugin_dir_path( $file ); ?>

 

*Note: none have trailing slashes but they do have the http:// in front- except paths have no http://*

Quick configure WordPress settings

This is a 60 second process that prevents you from getting buried by a mountain of email from the system. These settings will also help your SEO and prevent spamming.

For a company or static site (not a membership site)

Go to settings=>General

  1. Make sure you site URL is correct
  2. Makes sure “register new user” is unchecked
  3. Click “Save Changes”

Go to Settings=>Reading

  1. If you want a static homepage click “A static page”
  2. In the drop down choose “Sample Page”
  3. For article feed in most cases you want summary
  4. Click “Save Changes”

Go to Settings=>Discussion

  1. The top 2 checkboxes should be checked, “Allow people to post comments on new articles” should be unchecked
  2. Check comment author must fill out name and email
  3. Check users must be registered and logged in to comment
  4. Check automatically close articles and change the 14 days to 1 day
  5. Uncheck Enable nested comments
  6. Uncheck “Anyone posts a comment”
  7. Uncheck “A comment is held for moderation”
  8. Check “Comment must be manually”
  9. Check “Comment author must have previously approved comment”
  10. Uncheck Chow Avatars
  11. Click “Save Changes”

Go to Settings=>Permalinks

  1. Unless you want a specific structure from some reason it is best to use “Post Name”
  2. Click “Save Changes”

 

For a membership or blog site

Go to settings=>General

  1. Make sure you site URL is correct
  2. Makes sure “register new user” is checked
  3. Click “Save Changes”

Go to Settings=>Reading

  1. If you want a static homepage click “A static page”
  2. In the drop down choose “Sample Page”
  3. For article feed in most cases you want summary
  4. Click “Save Changes”

Go to Settings=>Discussion

  1. The top 3 checkboxes should be checked.
  2. Check comment author must fill out name and email
  3. Check users must be registered and logged in to comment (optional)
  4. Adjust “Automatically close articles” To the number of days you want to allow comments
  5. Uncheck “Anyone posts a comment” (trust us you do not want this much mail)
  6. Uncheck “A comment is held for moderation”
  7. Decide if you want to manually approve comments in “Comment must be manually”
  8. Recommended that you check “Comment author must have previously approved comment” if you are not doing the manual approvals
  9. Choose your Avatars
  10. Click “Save Changes”

Go to Settings=>Permalinks

  1. Unless you want a specific structure from some reason it is best to use “Post Name”
  2. Click “Save Changes”

Setting up a New WordPress Installation

In order to set up a new WordPress you must have a hosting company, access to a SQL database, and FTP access. This guide assumes you are performing an manual installation and not using the install wizard that exist in some hosting companies like Godaddy, Bluehost, and 1and1. You can also host with us.  While we don’t have the slick automated system of some of the big hosting companies, we do have inexpensive hosting and we will actually set up your WordPress install for you if you want.  We will, configure the recommended settings, upload a copy of our Theme Framework, and add the recommended plugins. All for just $36 per year.

Manual install is a very simple process:

Open PHPmyAdmin or SQL editing program and create a database for WordPress to use.

Create a MySQL user with all rights

Download the latest WordPress version at WordPress.org

Unzip the WordPress package

Make a copy of wp-config-sample.php and name it wp-config.php

Change the 4 items in bold to your information. Unless specified by your hosting company the 4th one will remain localhost

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'database_name_here' );

/** MySQL database username */
define( 'DB_USER', 'username_here' );

/** MySQL database password */
define( 'DB_PASSWORD', 'password_here' );

/** MySQL hostname */
define( 'DB_HOST', 'localhost' );

Upload the files to the directory you want. (usually the root domain or something like <root>/blog/

Activate the WordPress installation script by going to the domain name of the site you are installing.

Follow the instructions and your WordPress installation will be functional.

Next Step, configuring the settings! Configure button.

Quick Start for the Themefast Framework

Once you have downloaded the Themefast Framework, upload it to your development/test server. We recommend using the quick start guide below to get the basics out of the way so you can focus on the design.

This assumes you already have a WordPress installation running and configured. If you do not have a WordPress installation already installed and configured click here for setup instructions.

Open the style.css

In the comment section at the top of the file:

  1. Change the theme name to your theme name.
  2. Change the author to you.
  3. Change the description.
  4. Change the version number.
  5. If you are designing for a specific client, remove tags.
  6. If you are making a theme for distribution, find the approved tags and use the ones that match your theme.

Open the header.php

There are meta tags in place, you just have to add the information.

  1. If this is for a client go in and change the COMPANY NAME to the companies name (under author and copyright)
  2. Change DESIGN COMPANY NAME under Web_Author to your or your company name.
  3. Change SOCIAL MEDIA TITLE in og:title to the Title you want to see in social media shares.
  4. Change SOCIAL MEDIA IMAGE in og:image to the default image you want to appear in social media.

Open the footer.php

In the copyright line:

  1. Change DESIGN COMPANY NAME the client company name.
  2. Change DESIGN COMPANY NAME to you or your company name
  3. Change DESIGN COMPANY WEBSITE to a link to your website.
  4. While we have not protected the WordPress and link to our website, we recommend that you leave them. Outbound links are helpful to your sites SEO and the extra links give the impression that your website is more complex. In the interest of honesty we will also admit, it helps us as well.
  5. Open FTP
    • Delete the screenshot.png in the theme directory or your theme will still show the Theme Framework image on the appearance admin.
    • Upload your SOCIAL MEDIA IMAGE.
  6. Log into WordPress admin panel
    • The rest of the Quick Start happens in the Theme Customizer.
      1. Go to Appearance=>Themes
      2. Activate your new theme
      3. Go to Appearance=>Customizer
      4. Site Identity: Add “Site Title” and/or “Tagline” – this is optional if you do not want the name at the top of the page, leave blank
      5. Site Identity: Select “Site Icon” This acts as favicon and app icon
      6. Logo: If you want to use a logo add it here.

That’s it!

You now have the theme framework personalized for you or your client and can begin the actual styling of the theme without worrying about the functionality. We urge you go the the “recommended plugins” and install the free plugins listed. Not only are they compatible with the Theme Framework but we have handled the installation configuration right in the theme. These plugins allow you to easily style in the content box without coding or even the text editor.

Next Quick Guides

How to move the logo/site name/menu/page titles/widgets/the loop

Recommended plugins

How to style inside the content box (a must read)