About Simon Howell

This author has not yet filled in any details.
So far Simon Howell has created 15 blog entries.

Loop All Categories showing All Posts

$post_type = 'category'; $args = array( 'true' => false, 'orderby' => 'term_id', 'order' => 'ASC' ); $tax = get_terms( 'category' , $args); if ( have_posts() ) { foreach( $tax as $cat ) { echo $cat->name; while ( have_posts() ) : the_post(); the_title(); the_content(); endwhile; } }

By | May 16th, 2018|Uncategorised|0 Comments

Useful WordPress Development Plugins

Replace WordPress Media with Enable Media Replace Audit WordPress changes using Stream Change WordPress administrator menu options with Admin Menu Editor Simplify Look and feel for WordPress Editors with White Label CMS Easy WordPress Updates Manager with Easy Updates Manager

By | December 20th, 2017|Uncategorised|0 Comments

WordPress: Easy to remember template hierarchy

Aide memoir for the WordPress template hiearchy... Default for everything - archive pages, single posts and single pages (as well as all other content types): 1st: index.php Select template by page for specific archive displays, like category and taxonomy archives or templates for different page layouts: 1st: template_{$custom-post-type}.php or template_{NOSIDEBAR}.php 2nd: index.php For all pages [...]

By | July 21st, 2017|WordPress|0 Comments

WordPress: useful additions to functions.php

/* * Useful snippets for functions.php /* /* * Add support for the following: */ add_theme_support( 'title-tag' ); add_theme_support( 'post-thumbnails' ); add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list' ) ); /* * Register Menus */ function register_my_menus(){ register_nav_menus( array( 'primary' => __('Primary Menu', 'AD'), ) ); } add_action('init', 'register_my_menus'); /* * Allow php in widget */ [...]

By | July 7th, 2017|WordPress|0 Comments

WordPress: Must have plugins, updated

Must Haves All In One SEO Pack Out-of-the-box SEO for your WordPress blog. WordFence THE security plugin. WP Optimize Clean Up / Optimise your WordPress installation. WP Super Cache WordPress Caching. WP Smush It Optimise graphics files. WP Migrate DB WordPress database migration. Used in Specific Circumstances Advanced Custom Fields Provides simple flexibility. Post Types [...]

By | July 1st, 2017|WordPress|0 Comments

WordPress: Show title and alt on images

To add image alt and title attributes to images, add the following to functions.php: function add_image_title( $attr, $attachment= null ) {     $img_title= trim( strip_tags( $attachment->post_title ) );     $attr['title'] = $img_title;     $attr['alt'] = $img_title;     return$attr; } add_filter( 'wp_get_attachment_image_attributes','add_imgage_title', 10, 2 ); or replace $attr['title'] with: $attr['title'] = the_title_attribute( 'echo=0' );

By | March 24th, 2017|WordPress|0 Comments

WordPress: Two Columns using More button

1) Ensure you have added <!--more-->  in page content. Use the more button! 2) Use the following code to display content in two columns: global $more; $more = 0; echo '<div id="column_one">'; echo '&nbsp;'; the_content(''); echo '</div>'; $more = 1; echo '<div id="column_two">'; the_content('read more', true); echo '</div>'; 3) CSS to tidy it up: #column_one, [...]

By | March 7th, 2017|WordPress|0 Comments

WordPress: List all queries on the page

This code snippet will list all the queries executed on your WordPress page Add this to the bottom of the page: <?php if (current_user_can('administrator')){ global $wpdb; echo "<pre>"; print_r($wpdb->queries); echo "</pre>"; } ?>

By | June 28th, 2016|WordPress|0 Comments

WordPress: different CSS for different objects

Site: body { background-image:url('background.jpg'); } Single Page: body.page-id-78 { background-image:url('background.jpg'); } Several Pages: body.page-id-78, body.page-id-79, body.page-id-82 { background-image:url('background.jpg'); } Single Category: .category-CatName { background-image:url('background.jpg'); } Multiple Categories: .category-CatName1, .category-CatName-2 { background-image:url('background.jpg'); } Archive Pages: .archive { background-image:url('background.jpg'); } Custom Template, Post or Category: .page-template-name { background-image:url('background.jpg'); }

By | November 3rd, 2015|WordPress|0 Comments

What do Web Developers Do?

Excellent list of skills required to be a web developer in 2015: See here.

By | May 21st, 2015|Web Development|0 Comments