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…
Read MoreRemove 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…
Read MoreFind 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.
Read MoreOutput 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>’;
Read MoreGive 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…
Read MoreCreate 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…
Read MoreOutput 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…
Read MoreGenesis 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…
Read MoreRemoving The Default Genesis Responsive Mobile Menu
This guide looks at removing the Genesis responsive built in mobile menu, well, not just removing it but making it more modular to either use or not This is based on using the sample theme and with a simple code comment/uncomment you can enable or disable the mobile menu. There are times where you may want to…
Read MoreAdding Classes and Attributes to HTML elements in Genesis
Attributes can be added into various HTML markup elements via filters in the Genesis Framework, these attributes can be adding in an ID or additional CSS Class, or amending the Microdata Schema including role, itemscope or itemtype attributes. The HTML markup elements/sections also known as ‘contexts‘ are originally declared as functions in the core Genesis Framework in:…
Read More