WordPress Popular Posts is one of the most popular plugins for displaying popular posts (based on the number of views) in WordPress. This tutorial provides the steps to display 3 most popular posts in columns with image, title and category appearing one below the other in each post in a custom “Home Featured” widget area […]
Taxonomy archive template to show CPT entries grouped by another taxonomy in WordPress
Scenario: CPT: books Associated Taxonomy 1: universe Associated Taxonomy 2: series Requirement: In universe taxonomy’s term archives, show books grouped by series. Here’s the PHP code in taxonomy-universe.php for this: To view the full content, please sign up for the membership. Already a member? Log in below or here. Username Password Remember Me […]
Querying multiple taxonomies in WordPress
Scenario: CPT: books Associated Taxonomy 1: universe Associated Taxonomy 2: series Requirement: For each universe show the books grouped by their series. Note: Unlike in the screenshot, the code below ensures that if there are no books in a series, the series name will not appear. Also, as can be seen, books were present only […]
Transparent Site Header in Monochrome Pro
Updated on 27 Sep 2022Tested in Monochrome 1.6.0 and Genesis 3.4.0 Monochrome Pro comes with a fixed site header having a white background on all pages including the homepage (with front page 1 section that has the full-width background image) and single posts (that have the featured image as background below the site header). If […]
Off-canvas side menu in Genesis using Slideout.js
Update on January 12, 2020: Follow the updated tutorial here instead. Slideout.js is a touch slideout navigation menu for mobile web apps. In this tutorial, I share the steps to display a hamburger menu icon at smaller widths which when clicked/tapped will slide out the widgets placed in a widget area from the side of […]
How to load UIKit in WordPress
Looking to enqueue UIKit in your WordPress site? Add the following in your child theme’s functions.php: add_action( ‘wp_enqueue_scripts’, ‘custom_load_uikit’ ); /** * Load UIKit. */ function custom_load_uikit() { wp_enqueue_style( ‘uikit’, ‘//cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.30/css/uikit.min.css’ ); wp_enqueue_script( ‘uikit’, ‘//cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.30/js/uikit.min.js’, array( ‘jquery’ ), ‘3.0.0.30’, true ); wp_enqueue_script( ‘uikit-icons’, ‘//cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.30/js/uikit-icons.min.js’, array( ‘jquery’ ), ‘3.0.0.30’, true ); } Refer to https://getuikit.com/docs/installation for […]
How to remove Email and Website fields from Comment Form in WordPress
Looking to remove Email and Website/URL fields in your WordPress site’s comment form? Add the following in your child theme’s functions.php: add_filter( ‘comment_form_default_fields’, ‘comment_form_custom_fields’ ); /** * Remove Email and Website fields in comment form. * * @param array $args Default comment form arguments * @return array Modified comment form arguments */ function comment_form_custom_fields( $args […]
How to display posts grouped by year in WordPress
In a recent Genesis customization work I took up, the requirement was to display entries of a Custom Post Type grouped by years the posts were published in. The output needs to be the year the latest entry was published in, then an unordered list of titles linking to their permalinks for all entries published […]
Inline Site Header and Primary Navigation in Pretty Creative
In Pretty Creative theme, the Primary Navigation menu is moved above the site header out of the box. In this tutorial, I share the steps to wrap the site header and primary nav in a custom div and float site header to left and primary nav to the right on desktops. We shall also make […]
Responsive “background” image for Front Page 1 section in Digital Pro
Digital Pro has code that automatically sets the height of Front Page 1 widget area to that of viewport height and uses Backstretch jQuery script to set an image (changeable via WordPress customizer) as its background. There might be cases when you want the Front Page 1 section to take up only as much height […]
Recent Comments