tuts

  • Drop down menus, z-index and IE

    One of Internet Explorer’s (IE) most commonly encountered bug is when using z-index. I experienced this recently when using the DDSlider plugin for WordPress along with a drop down navigation. Whilst doing some browser testing I noticed that the drop down menu hides behind the DDSlider. I tried to fix this using z-index. I applied…

    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

  • Cufon visited link color fix

    I recently had an issue with the color of visited links when using Cufon. More specifically, I am using the WP-Cufon plugin with WordPress. The issue I had was that the color I set for the link wasn’t being rendered by Cufon. In firebug it showed that the element color was red, but it was showing…

    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