Adding the following in child theme’s functions.php will display the word count in post info on single post pages in Genesis: add_shortcode( ‘word_count’, ‘func_word_count’ ); /** * Register custom [word_count] shortcode to display the number of words in a post. * * @return word count. */ function func_word_count() { $content = get_post_field( ‘post_content’, get_the_ID() ); […]
WordPress
Soliloquy slider below header on Pages in Showcase Pro
This tutorial provides the steps to show different Soliloquy slider below the header on different static Pages in Showcase Pro. The difference between this and the earlier tutorial is that we are going to set the header to have a solid background color here and set a padding equal to the height of the fixed […]
How to add categories and tags as body classes in WordPress
In the members-only forum, a user wanted to know how to automatically add slugs of both categories and tags to the existing list of body element’s classes in WordPress. Adding the following in child theme’s functions.php will automatically add categories and tags as body classes in WordPress on single pages (other than static Pages). To […]
WooCommerce Shop Archive Image in Genesis using ACF Pro
In the comments section of How to overlay entry title on featured image in single Posts tutorial, a user asked: …Now I have the opposite problem on the main shop page of woocommerce: the effect doesn’t work, the image doesn’t appear and the title remains in standard place… This tutorial provides the steps to relocate […]
Soliloquy slider on single Posts and static Pages in Showcase Pro
In the comments section of Full width Soliloquy slider in Showcase Pro tutorial, a user asked: How can I add Soliloquy to individual pages? In this tutorial, we shall add a checkbox in the WordPress editor which when ticked, will display a number field in which Soliloquy slider’s ID can be entered and then the […]
How to remove Scripts section from Pages of a specific Page Template in Genesis
In the comments section of The Comprehensive Guide to Genesis Theme Supports, a user asked: how can I remove the inpost scripts for a certain page template? Adding the following in child theme’s functions.php will make Scripts section to not appear for static Pages to which page_products.php template has been applied. add_action( ‘init’, ‘custom_remove_scripts’, 11 […]
Before and After Slider in WordPress using ZURB TwentyTwenty
TwentyTwenty is a jQuery plugin from ZURB that can be used to show multiple sets of before/after images with the images appearing superimposed on each other. Dragging a vertical bar horizontally left and right reveals the before and after image respectively. In this tutorial, we shall load the files needed for ZURB TwentyTwenty draggable before-after […]
How to auto play videos as they come into view in Genesis
This tutorial provides the steps to: add custom fields to upload/select mp4, webm and ogv video files for Posts using Advanced Custom Fields. replace content archive images with muted looping videos (if set) for each post appearing on the archives on the front end using shortcode built in WordPress. use jQuery Visible to a) play […]
How to set up WordPress Coding Standards in Visual Studio Code
I am slowly moving away from Sublime Text to Microsoft’s Visual Studio Code due to VS Code’s superior feature-set like a built-in file navigation tree (which is better than ST’s SideBarEnhancements package), IntelliSense and built-in Git. Below are the steps to have VS Code automatically sniff and display warnings/errors (if any) in your PHP files […]
How to set up Font Awesome icons above menu items in WordPress
In the comments section of How to display custom menu with menu descriptions and icons in a WordPress widget, a user asked: How would I position them? I’ve replicated what you did in the tutorial, but I can’t get the icons above the text using CSS. Thanks for your help! We can automatically generate CSS […]
Recent Comments