Showing posts with label wordpress. Show all posts
Showing posts with label wordpress. Show all posts

10 June 2017

create a child theme

: : for WordPress : :



Child themes ... it's a thing ... use them!  There are a lot of great articles already out there that explain what a child theme is, why you should use them and how to set one up.  This article on Smashing Magazine By Nick Schäferhoff is my go-to: How To Create And Customize A WordPress Child Theme

NB: Under "When to Use a Child Theme" Nick says "So, should you always build a child theme ... ? No, it really depends." ... I disagree ... I think you should always use a child theme.

As great as Nick's article is though, I thought I'd give you a condensed, step by step process to simplify it even further, for next time.  I do suggest you read up on child themes first so you know what/why you're setting one up, and that article from Smashing Mag is a great place to start.

Once you've got your head around that, here's the cut-down version for quick reference (I'll use the same headings so you can refer back to the original article for more info at any time):

NB: I usually work with offline files, then load them via FTP to the webserver.  Nick has a great suggestion to zip the theme folder then install it like a normal theme via the WordPress Theme menu ... gold!

Set Up A Basic Child Theme

"... a child theme needs three things: its own folder, a style sheet and a functions.php file."

Create a Folder in wp-content/themes

  • It can be called anything, but no spaces - something like "twentyfifteen-child" will work, and so would "myawesomewebsite".

Create a Style Sheet

  • Create a new text file and call it "style.css" (you can use any text editor or you can be fancy and use Dreamweaver ... do not under any circumstances use Word!)
  • Paste the style sheet header as follows:
/*
 Theme Name:   Twenty Fifteen Child Theme
 Description:  A child theme of the Twenty Fifteen default WordPress theme
 Author:       Nick Schäferhoff
 Template:     twentyfifteen
 Version:      1.0.0
*/

Activate Child Theme

  • Skip this step for now!

Create functions.php

  • Same as the Style Sheet, just create a text file and call it "functions.php" (these files are of course created in the theme folder we created earlier "wp-content/themes/myawesomewebsite/functions.php"
  • Copy the following code into the file (yep, that's PHP ... don't worry, you don't need to fully understand PHP to get this going, trust me!):
<?php
//* Code goes here

Inherit Parent Styles

  •  DON'T use the @import method ... (this is the one thing I don't like about the article, this is the old way of doing things so in my humble opinion, why mention it at all?!)
  • DO use the wp_enqueue_style() method ... copy this code into your functions.php file (underneath the other bits we just pasted):
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );

function enqueue_parent_styles() {
   wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}

Upload Theme

  • NB: This is a variation of Nick's "Activate Your Theme" step
  • Zip your Theme folder, eg, "myawesomewebsite"
  • Login to WordPress
  • Click on Themes
  • Click on Add New and upload your zip file
  • NB: The parent theme must already be installed
  • Activate your child theme
Congratulations you've created and installed your child theme ... easy right?!


24 May 2017

two-factor authentication (2FA)

: : for wordpress security using ithemes : :



What is WordPress Two-Factor Authentication?

WordPress two-factor authentication (or WordPress 2-step verification) adds an important extra layer of protection to your WordPress site’s login and admin area by requiring 1) a password and 2) a secondary time-sensitive code to login.

More about WordPress 2FA »

The time-sensitive code is generated via a two-factor authentication app, usually installed on your smartphone. We use Authy, but you can use any 2FA app.

How to setup and use Authy »
(NB: If you are a client of Accurate Expressions, 2FA is most likely already enabled on your site so you can skip that bit at Step 2 of these instructions!)

01 October 2016

20 Hidden WordPress Features You Might Not Know About

 : : for WordPress : :



from the Elegant Themes Blog, written by Shaun Quarton ...

20 Hidden WordPress Features You Might Not Know About


If you use WordPress regularly, you probably have a good handle on how everything works.

However, a little digging is required to access WordPress’ functionalities in full. You might not realize there are plenty of “hidden” WordPress features – some more hidden than others.

In today’s post, I’m going to uncover 20 of these hidden WordPress features, so that you can get the maximum from the world’s most popular CMS.

This post is primarily targeted at WordPress beginners. If, however, you consider yourself to be a WordPress dab hand, you might still learn something new or at least refresh your memory of commonly underutilized features.

Read the full article here ...

08 June 2016

replace a media file

: : for WordPress : :



This method uses the plugin Enable Media Replace
  • From your WordPress Dashboard, click on Media in left sidebar
  • Search for the file you want to replace
  • Click to select the file
  • In the right column you'll see a bunch of fields, look for the button "Upload a new file" next to Replace media
  • Click to display the Replace Media Upload screen:

  • Click on Choose File to select the new file (ensure new file is the same file type, ie, .pdf, .jpg, .png etc)
  • Ensure "Just replace the file" is selected
  • Click Upload

Once you've replaced your media file, double check your site to ensure the new media is visible/downloadable.

12 September 2014

optimising posts/pages in your wordpress site

: : for WordPress using Yoast SEO : :



optimising individual posts

Use the snippet preview added by the WordPress SEO plugin:

optimize wordpress article general tab

This preview will automatically take the values you’ve already filled in in your blog post and apply them to your template, but you can also override the title completely using the title field just below it:

wordpress seo title input

The input will show a warning below it if your title is becoming too long. The title length is not a fixed amount of characters but rather limited to the length of the display in the search results.

For titles the following things are important:
  • They should always contain your brand, preferably at the end, so people may recognise you in consecutive searches.
  • They should always contain the keyword you think is most important for the current post or page, which we’ll call the focus keyword from now on. The focus keyword should preferably be at the beginning of the title.
  • The rest of the title should entice people to click.

optimise your descriptions

Now that we’ve got proper titles, we should start to focus on meta descriptions. The meta description can be used by search engines to show in the snippet, it’s the black piece of text shown beneath the URL. The meta description is usually only used when it contains the keyword the searcher was searching for.

Some plugins, most specifically the All in One SEO plugin, use so called “automated descriptions”. They use the first sentence of a post to fill the meta description by default. That’s not very smart. That first sentence might be an introductory sentence which has hardly anything to do with the subject.

Thus, the only well written description is a hand written one, and if you’re thinking of auto generating the meta description, you might as well not do anything and let the search engine control the snippet… If you don’t use the meta description, the search engine will find the keyword searched for in your document, and automatically pick a string around that, which gives you a bolded word or two in the results page.

Auto generating a snippet is a “shortcut”, and there are no real shortcuts in (WordPress) SEO (none that work anyway).

So, use the meta description field you find in the WordPress SEO plugin to write a meta description. Make sure it entices the reader to click through and make sure that it contains the focus keyword of your post or page at least once.

You’ll notice we do not mention meta keywords. We don’t use them and neither should you, for an explanation, read this article by Joost: meta keywords and why I don’t use them.

This is an excerpt from the WordPress SEO Tutorial which you can read here »

27 October 2010

embed a youtube video in your wordpress site

In YouTube:

  1. Click on the <Embed> button underneath the video
  2. Uncheck all the tick boxes
  3. Select 640 x 505 (or enter custom sizes in the Custom fields)
  4. Click on the code and copy (⌘-C)


In WordPress:
  1. Edit/create new Post/Page
  2. Paste code (⌘-P)


There's more information in YouTube help here!

13 September 2010

add audio files to your wordpress blog

: : for WordPress : :


These instructions will add your audio files to your Media Library.
  1. From your Dashboard, click on the Media link in the left-hand sidebar.
  2. Click on Add New
If you are using the Flash uploader:
  1. Click on Select Files
  2. Select the appropriate file, then click on Select
  3. Once the file has been uploaded, you can add further details including:
    • Title
    • Caption
    • Description

  4. Click on Save all changes
If you are using the Browser uploader:
  1. Click on Choose File
  2. Choose the appropriate file, then click on Choose
  3. Click on Upload
Your audio files are now in your Media Library ready to include in your posts/pages.

To insert an audio player in a post/page:
  1. Edit your post/page
  2. Click on the musical notes next to Upload/Insert
  3. Click on the Media Library tab
  4. Click on Show next to the appropriate audio filename
  5. Click on the Audio Player button under the Link URL field
  6. Click on Insert into Post
Combine the two processes to insert a file from your computer directly into your post/page.
  1. Edit your post/page
  2. Click on the musical notes next to Upload/Insert
  3. Click on Choose File
  4. Choose the appropriate file, then click on Choose
  5. Click on Upload
  6. Once the file has been uploaded, click on the Audio Player button under the Link URL field
  7. Click on Insert into Post
Your file will be inserted into your page/post as an audio player, and it will be stored in the Media Library as well!