Welcome to WP Beaches

WordPress Websites design specialists, based in the Northern Beaches, Sydney
Design, Develop, Host

RECENT POSTS

Add Odd / Even CSS Class Name to Posts in WordPress

You can add an ‘odd‘ and ‘even’/ CSS class name to sequential posts in a blog /archive page by utilising the post_class filter. You can add the snippet below in your theme functions.php file. To target specific posts in an archive or home page, you can either wrap the code in a conditional statement or write your…

Hide Pages from Search Results in WordPress

customise-search-results

In WordPress by default both posts and pages are included in the Search Results, you can remove pages or posts for that matter and also include custom post types by using the action hook pre_get_posts. In your functions.php add the appropriate snippet; To remove pages from the search results add in… To remove posts from the…

Coding a User Friendly Carousel Slider in WordPress

carousel-easy-slider-wordpress

This tutorial uses Slick and Advanced Custom Fields Pro to code a user friendly carousel slider in WordPress. It uses the gallery field from which a user can easily add or change order of slides without having to touch the code. The example slider in this tutorial will use the Multiple Items Layout in Slick. Getting Slick in…

Add Christmas Snow Effect to your WordPress Site

snow-effect-wordpress

You can add a Christmas snow effect to your WordPress web site by using a snowstorm javascript which has been around for more than ten years. This used to be bundled with Jetpacks modules and I believe you can only access it now if your site is hosted on the main WordPress.com, but never fear…

How to Add a Footer or Tertiary Menu to a Genesis Child Theme

Genesis comes with 2 menus ready to go, the Primary and Secondary menus, by default these sit on top of one another in the framework and Genesis Sample theme: This tutorial takes you through how to make a third menu and place it in the footer;  The Footer Menu. Although you can use this as…

Remove Comments Based on Categories in Genesis

remove-comments-based-on-category

You can remove and control the Comments section based on what Category a post is set to in Genesis by conditionally removing an action based on the category. So in the code snippet above I want comments only on a certain category which has the id of 38, so the code says that is the…

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…

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…

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…