thehazels - Page 2 of 2 - websites made simple thehazels - Page 2 of 2 - websites made simplethehazels | websites made simple | Page 2

Useful Icons

29. November 2013 by Antonia Whitaker
Categories: Tools | Leave a comment

External Links

I like to have all external links open in a new window. However, the traditional method of

target=_blank

is not XHTML compliant. So another option is to use JavaScript’s window.open function.

Open external links in a new window, is a plugin that sorts this in WordPress. Any link starting http will open in a new window unless it matches the ignore options. Unfortunately this doesn’t seem to work in IE, so some extra work required. I would also like a default hover text such as ‘opens in new window’.

I also wanted to some means of showing which links are external ones. I found a nice css solution on the electric toolbox.

First apply the image to any anchor starting with ‘http’ (this allows for both http and https links, although it might be better to define separate images for each):

a[href^="http"] {
background: url(images/external.png) center right no-repeat;
padding-right: 13px;
}

Then make sure it ignores any absolute links for your own site:

a[href^="http://thehazels"]  {
background: none;
padding-right: 0;
}

I’ve used the icon available from Wikipedia and then coloured it in Gimp.

28. November 2013 by Antonia Whitaker
Categories: Wordpress | Tags: , | Leave a comment

Useful Plugins

Email Address Encoder
encodes email addresses in the html
Geka Submenu
supplies a widget to use child links to create a submenu
Google Analyticator
as well as enabling google analytics, it adds an overview to your dashboard
jQuery UI Widgets
chose which elements of jQuery UI to add
WordPress SEO
XML sitemaps, plus meta data and many hints and tips
Advanced Browser Check
warns if using old version of browser
Kebo Twitter Feed
simple twitter feed without having to authenticate app
Photospace Responsive
simple plugin which displays a gallery as a slideshow (uses gallerific)
Revision Control
define how many revisions you want to keep of posts and pages (otherwise never deleted)
Photospace Responsive
simple plugin which displays a gallery as a slideshow (uses gallerific)

To Do

  • website performance: caching, minify
  • backup scheduler

07. November 2013 by Antonia Whitaker
Categories: To Do, Wordpress | Tags: , , | Leave a comment

Queries

  • for PHP error reporting, set WP_DEBUG to true in wp-config.php
  • new WP_Query : fetch posts and pages, e.g.
  • while ($query->have_posts()) { 
      $query->the_post();
      echo the_title() . the_content();
    }
  • $query->result: whole thing
  • $query->request: sql query

23. October 2013 by Antonia Whitaker
Categories: Wordpress | Tags: | Leave a comment

Modifying a theme

The best way to make any changes to a theme is to create a child theme. Full details are in the WordPress Codex. Here’s a reminder of the steps:

  1. Create directory for theme in wp-content/themes – convention is <name of parent>-child
  2. Main file is style.css. Needs the following:
    /*
     Theme Name:     Twenty Thirteen Child
     Theme URI:      http://example.com/twenty-thirteen-child/
     Description:    Twenty Thirteen Child Theme
     Author:         John Doe
     Author URI:     http://example.com
     Template:       twentythirteen
     Version:        1.0.0
    */
    
    @import url("../twentythirteen/style.css");
    
    /* =Theme customization starts here
    -------------------------------------------------------------- *
  3. Activate theme
  4. Editor section shows a list of all the theme’s files

19. October 2013 by Antonia Whitaker
Categories: Wordpress | Tags: | Leave a comment

Newer posts →