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
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…
Add Christmas Snow Effect to your WordPress Site
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…
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…
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…
Remove Comments Based on Categories in Genesis
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…