Warning: array_map(): Argument #2 should be an array … /wp-includes/category-template.php on line 1158

Since upgrading to WordPress 4.4 I had some sites’ post archives display with the following error – ‘Warning: array_map(): Argument #2 should be an array in /home/…/public_html/wp-includes/category-template.php on line 1158′ This seems to be an issue with WordPress’ function get_the terms and the argument $items referenced as an array, and will be addressed in the next update…

Read More

Add a CSS class to a menu or menu item in WordPress

CSS Classes can be added to a WordPress menu via a filter named – wp_nav_menu_args , a number of other parameters can also be added. Another filter nav_menu_css_class can also be used for actual list items. Adding a CSS Class to a menu function modify_nav_menu_args( $args ) { if( ‘primary’ == $args[‘theme_location’] ) { $args[‘menu_class’] = ‘menu…

Read More

Creating a Genesis Child Theme from Scratch of the Genesis Framework in WordPress

How to create a Genesis child theme from scratch from the Genesis Framework that looks like the parent theme, including support for HTML5 , footer widgets, custom backgrounds and enable the viewport setting that allows for responsive design on tablet/mobile devices. Install Genesis Framework First grab the Genesis framework and upload the theme into WordPress via…

Read More

Add Multiple Site Background Images To Genesis Agency Pro Theme

You can add a multiple images as alternating site background images in the Genesis Agency Pro theme by tweaking the backstretch jQuery plugin that comes with the theme. Out of the box Agency Pro uses one master site background image as set in the Customizer, preferably at 1600 x 1000px. Prepare your images Get your images ready at 1600 x 1000px and…

Read More

Yoast WordPress SEO Tutorial, Set up SEO in an Optimal Way

wordpress-seo-settings

Yoast WordPress SEO Tutorial  v3 Getting the best WordPress SEO settings in WordPress can be handled by a number of different plugins, one of the more popular ones is WordPress SEO from Yoast (1 million active WordPress installs). Recently it has been upgraded to version 3 which is a major rewrite of the codebase on how the…

Read More

Create a Loop of Featured Images in a Slider from Posts in Genesis

slick-slider-featured-images-genesis

You can create a slider of Featured Images from the posts in Genesis by creating a custom loop and using Slick Slider. Setting Up Slick Slider First download and set up the Slick files needed, you’ll need to file these in your theme’s js and css directories: slick.min.js ~> js slick-theme.css ~>css ajax-loader.gif ~>css fonts/ ~>css…

Read More

Show Custom Post Types in Category Archive Page

By default WordPress custom post types do not appear in a category or tag archive page, to change this behaviour and display the custom post type you can add this filter/function to your themes functions.php file. function themeprefix_show_cpt_archives( $query ) { if( is_category() || is_tag() && empty( $query->query_vars[‘suppress_filters’] ) ) { $query->set( ‘post_type’, array( ‘post’, ‘nav_menu_item’, ‘custom-post-type-name’…

Read More