Welcome to WP Beaches
WordPress Websites design specialists, based in the Northern Beaches, Sydney
Design, Develop, Host
RECENT POSTS
Add Featured Image at top of Single Post/Page in Genesis
One of the latest themes from Genesis has the ability to show the featured image that is set to appear at the top of a post or page, the setting is shown in the Customizer and is enabled by default – here is how you can use this in any Genesis theme. It is best…
Remove Password Strength Rules in WooCommerce Checkout
You can remove the password strength rules in WooCommerce checkout page when signing up for an account password, obviously this is less secure but may lessen cart abandonment by your customers – I have a few sites whereby this is a pain point for users. This snippet from @WPprodigy will take the strength-o-meter policy away…
Find and Trump Z-Index on all Elements on a Page with jQuery
The jQuery snippet below will search all HTML elements on a page and find the element with the highest z-index value and capture that value in a variable – then using the .css function in jQuery, assign and increment that value by 1 to a selector you have chosen.
Output the label of an ACF field
You can output the label of an Advanced Custom Field: ACF field by using the get_field_object() function which stores an array of data about the custom field. /* * Output Label from ACF field */ $field_name = “acf_field_name_here”; $field = get_field_object($field_name); echo ‘<h3>’. $field[‘label’] . ‘</h3>’;
Give Comments Fields Some Full Width Love
Looking at the WordPress comments field input fields in Genesis on mobile leaves you a bit shortchanged… Give them a full width feeling… @media only screen and (max-width: 860px) { .comment-respond input[type=”email”], .comment-respond input[type=”text”], .comment-respond input[type=”url”] { width: 100%; } } Just change the max-width value to the pixel number that you want the…
Create a Expand/Collapse FAQ Accordion, Collapse other on Click
This guide creates a FAQ expand/collapse javascript question and answer set up whereby when another question is expanded the current open answer is collapsed. So only one is expanded at any point. In the example below click to see how it works. I have changed it to better work in the WordPress post editor – but can be used in…
Output a random string on each page load in PHP
To output a random string from an array on each page load you can use the array_rand function in PHP. So in the above snippet the array is created and assigned to the $input variable, it is then output using echo and passing the $input variable initially to array_rand and the result of that being assigned…
Genesis Title Toggle on Custom Post Types – Learn Dash
By default Genesis Title Toggle only works on pages, but you can enable it for regular posts and custom post types by using a filter that the plugin comes with – in the example below I need it enabled for the default custom post types that come with Learn Dash. So in the snippet above…