Since the very beginig WordPress, the featured image was one of the main elements of each post and page. It was mainly used as a thumbnail photo in post feeds such as categories, archives or search results. Nowadays there’s a wide variety of application for it, depending of the developer’s imagination and ideas. This tutorial […]
PHP
How to use is_front_page and is_home functions in WordPress
In many cases WordPress developers want to display specific content only on homepage. In other cases they’ll want to display some content only on subpages and not on the homepage. This content can be any kind of HTML elements (text, images…), event template parts such as widget areas (sidebars) or headers and footers (different on […]
Simple Estimated reading time PHP code WordPress script
Many blogs and web magazines display their articles estimated reading time. This information is usually displayed in the header of the article together with other meta data. Showing the read time estimate encourages visitors to read the post, as they know how much time it will take them. The result is increased visitors engagement on […]
Estimated read time PHP script for WordPress
Modern web magazines and blogs show to their visitors estimated read time for each article. This information encourage visitors to read an article, increases visitor engagement on the web site and improves user experience. It results with more page views and lower bounce rate. The reading time estimate is usually displayed in the article header […]
How to disable comments in WordPress
By default, all posts and pages in WordPress allow users to post comments. While some websites will find this feature useful, in most cases comment forms only attract spam bots. Spam is the primary reason to disable comments in WordPress. To block comments, developers can customize Discussion settings, edit the template files or use a […]
How to register sidebars and add widget areas to WordPress themes
Every WordPress theme comes with at least one sidebar or widget area. Sometimes that’s not enough for certain projects. Sooner or later a developer will have to add more widget areas and place them in custom positions inside a WP theme. In this tutorial we’ll show you how to register sidebars and add widget areas […]
How to embed custom stylesheet CSS files into WordPress?
Either if creating your own WordPress theme, a child-theme from it’s parent or editing a theme, you will encounter the need to add your own CSS custom stylesheet. Most probably you will also want to override some styles from the default theme stylesheet. There are several ways to add your own styles and/or override default […]