In the tutorials requests Trello board, a user asked: I’m styling posts differently based on what category they are in, but I’d also like to style them differently based on which author they are written by. I am adding the category name to the body class via the code I’ll put in the comments. I’d […]
Search Results for: wordpress
WordPress page Builders
I have been testing a few popular and upcoming page builders this week and would like to share my thoughts on the same in this blog post. I have rebuilt Parallax Pro’s homepage using Elementor, Brizy and Oxygen as a learning exercise and to get familiar with how these page builders work. Here are the […]
How to load WooCommerce CSS and JS only on shop-specific pages in WordPress
Update on 7 Mar 2022: Follow this updated tutorial instead. — When you have a WooCommerce-powered shop in your WordPress site, assets like the following may be loading on all the pages of the site (depending on what plugins/services/theme are/is active): woocommerce-layout.csswoocommerce-smallscreen.csswoocommerce.csstwenty-seventeen.css add-to-cart.min.jsjquery.blockUI.min.jsjs.cookie.min.jswoocommerce.min.jscart-fragments.min.js If you do not have a “Add to Cart” feature in your […]
How to exclude Posts from a specific Category on the Posts page in WordPress
Looking to have posts from a particular category or categories not appear on your WordPress Blog? Whether you have the list of posts appearing on the homepage or on a separate Posts page (something like this), pre_get_posts filter hook in WordPress can be used to alter the query on non-singular pages such as the Posts […]
Linting and Formatting in Visual Studio Code for WordPress
In the past, I wrote about setting up WordPress PHP code standards in Visual Studio Code. This article shows how we can go one step further and set up JavaScript & CSS linting (code analysis for potential errors) and pretty printing / auto formatting for PHP, CSS & JS. We are going to use Node, […]
How to set a custom title for Posts page in WordPress
When a static Page (typically titled Blog) is set as the Posts page at Settings > Reading in WordPress, its title will usually appear at example.com/blog. The easiest way to set what appears as the Posts page’s title is to change it in the backend. But for some reason, if you want the frontend title […]
Soliloquy Image Grid in WordPress
One of the reasons why I prefer Soliloquy over other slider plugins is the abundant number of hooks and filters which provide complete control of the HTML output. This tutorial provides the steps to loop through the image slides (client logos, in this example) of a Soliloquy slider and display them in a grid using […]
How to load and use Font Awesome 5 in WordPress
Updated on May 07, 2018 Font Awesome 5 has been recently released with SVG vector icons compared to the earlier icon fonts. In this tutorial, I share detailed steps on how to load and use Font Awesome 5 in WordPress using both the methods (CSS Pseudo-elements and inline SVG) for free and Pro versions. SVG […]
How to rotate widgets in Primary and Secondary sidebars in WordPress
In the Genesis Facebook group, a user asked: how do i automagically rotate widgets in both the primary and secondary sidebars, on screen refresh? where do i find the index names of sidebars? Adding the following in child theme’s functions.php will shuffle and display widgets of Primary and Secondary sidebars in random order on page […]
if conditional in WordPress for checking if a post has been published between two dates
In the members-only forum, a user asked: I need to know if is possible a conditional from date, for example is_date (1 april 2017 to 1 septiembre 2017){ } This tutorial provides the code to display a Promo Bar above header on single posts published between the specified start and end dates in Genesis. Approach […]
Recent Comments