With the release of 3.7, WordPress now has the ability to update itself in the background, requiring no action for site admins. Overall, we love this new feature, but there are many reasons you might want to disable background updates. WordPress provides several filters to customize these updates, including ways to completely disable them, enable …
Dave Warfel
With the release of version 3.7, WordPress search has taken on quite a few improvements. Gone are the days of sorting results in chronological order, exact keyword matches & so on. WordPress search has finally put relevance ahead of publish date, and included several new filters for developers to further expand the search experience with …
Do you want to display the total number of WordPress posts for a specific custom post type you’ve created? Use the following code to get the total number of published posts in a custom post type, and then display it in your theme. Replace “post-type-name” with the name of the custom post type you created …
WordPress 3.7 was released on Oct 24, 2013. We’ve highlighted the big changes below, but click the links within each section to learn more about the major improvements. Improved Search Relevance For years, one of the biggest issues we’ve had with WordPress is its search engine. The default WordPress search has always been lacking behind …
Do you want to display the total number of WordPress users on your entire site? Use the following code to get the total number of users, and then display it in your theme. This returns ALL users, regardless of User Level. <?php // Get total number of users $total_users = count_users(); echo $total_users[‘total_users’] . ‘ …
With the imminent release of WordPress 3.7, some of you are wondering how it will affect your site. One of the biggest changes is the background updates for the WordPress core. For minor version changes & security releases (ex: 3.7 to 3.7.1), WordPress will automatically update itself. WordPress has identified a few scenarios where itΒ won’t …
Do you want to display the total number of WordPress comments on your entire site? Use the following code to get the total number of comments, and then display it in your theme. This only gets comments with “Approved” status. <?php // Get total number of approved comments $count_comments = wp_count_comments(); $total_comments = $count_comments->approved; echo …
Do you want to display the total number of WordPress pages on your entire site? Use the following code to get the total number of pages, and then display it in your theme. This only gets published pages, not the pages with “Draft” status. <?php // Get total number of pages published $count_pages = wp_count_posts(‘page’); …
Do you want to display the total number of WordPress posts on your entire site? Use the following code to get the total number of published posts, and then display it in your theme. <?php // Get total number of posts published $count_posts = wp_count_posts(); $total_posts = $count_posts->publish; echo $total_posts . ‘ posts. ‘; ?> …
WordPress provides a function called post_class() that outputs various class names for the post being referenced. This is most often used on post listing template files, such as index.php & archive.php, as well as the single.php template file. You’ll often see it in your theme like this: <article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>> The …