WP

  • Beginner WordPress Theme Development

    Last Thursday (28th July 2011) we held the third London WordPress meetup. The meetup is for WordPress users and professionals in London and aims to provide a networking and learning platform. I gave a talk on Beginner WordPress Theme Development, which introduced the basic structure of a theme and some key concepts. Here are the…

    Read More

  • Spinning Update progress on WordPress pages

    Spinning Progress Wheel One of my clients recently informed me that a site that I had built had a problem; when some pages were published or updated, the progress wheel would spin until the browser eventually timed out. It had been a month or so since I had finished the site development and there had…

    Read More

  • Internal Link Layout Issue

    I recently came across an unusual problem when using internal links on a WordPress site. The link in question linked from one page on the site to a specific section on another page of the same site. When this link was followed there was an error with the page layout. More accurately, the new page…

    Read More

  • Custom Post Type Archive Pages – WordPress

    Need to show your custom post types on your category archive pages? Add this to your functions.php file: add_filter(‘pre_get_posts’, ‘query_post_type’); function query_post_type($query) { if(is_category() || is_tag()) { $post_type = get_query_var(‘post_type’); if($post_type) $post_type = $post_type; else $post_type = array(‘post’,’cpt’); // replace cpt to your custom post type $query->set(‘post_type’,$post_type); return $query; } } Now change the variable…

    Read More

  • WordPress Custom Post Templates

    Once you have built a Wordpres custom post, you will often want to style it using it’s own template. I searhed the web for a solution and courtesy of twothirdsdesign, if found the answer. The template used for a custom post view is decided by the ‘get_single_template()’ function in the wp-includes/theme.php file.  And it basically…

    Read More

  • Adding the excerpt function to WordPress pages

    The excerpt function that is so useful in WordPress posts, does not come as standard on pages. Luckily, the fix is easy. Add the following code to your functions.php file and voila! Excerpts on wordpress pages. // add excerpts to pages function add_page_excerpt_meta_box() { add_meta_box( ‘postexcerpt’, __(‘Excerpt’), ‘post_excerpt_meta_box’, ‘page’, ‘normal’, ‘core’ ); } add_action( ‘admin_menu’,…

    Read More

  • Sorting WordPress Posts Using Surnames

    A client recently requested that their ‘Members’ page be sorted by surname and not first name. The lists were generated using the follwing code: <?php$cat_args = array( ‘sort_column’ => ‘post_title’, ‘order’ => ‘ASC’, ‘parent’ => 12); $categories =   get_categories($cat_args); foreach($categories as $category) { echo ‘<ul id=”member”><li><h3>’ . $category->name.'</h3></li>’; $post_args = array( ‘numberposts’ => 50,…

    Read More