Skip to main content

Posts

How to Create Custom Post Types in WordPress without using Plugin

WordPress has many different content types. A single item of content is called a post, also post is a specific post type. All the post types are stored in the same database table (wp_posts) and differentiated by a column called post_type. By default, five post types are available in WordPress. Post (Post Type: ‘post’) Page (Post Type: ‘page’) Attachment (Post Type: ‘attachment’) Revision (Post Type: ‘revision’) Navigation menu (Post Type: ‘nav_menu_item’) Also, you can create new post types which are called Custom Post Types. A custom post type can be added to WordPress using register_post_type() function. It very simple and you don’t need to use any plugin for that, you can register your custom post types without using Plugin. In this article, we’ll show you how to create custom post types in WordPress. Also, you’ll know how to add taxonomy or category of custom post types in WordPress. WordPress custom post type helps you to divide up your website content in a more stru...

The Transitioning Guide of WordPress.com to Self-Hosted WordPress

WordPress is one of the most flexible and versatile blogging platforms. It is considered as an ideal blogging platform for webmasters who are seeking to build their blogs in few minutes. But if you’re a newbie then you must be confused, which way to go WordPress.com or WordPress.org. And if you’re are a regular WordPress user then you must be wondering how to switch your Blog from WordPress.com to WordPress.org. Making a switch to WordPress.org can be intimating for users who aren’t as technically inclined. Therefore, keeping this is mind here is a comprehensive guide to help amateurs understand well about WordPress.com and WordPress.org and how a webmaster can move to self-hosted WordPress. WordPress.com vs. WordPress.org A Brief Explanation to WordPress.com WordPress.com is a free self-hosted website used for commercial purpose. It runs on an open source WordPress platform, which means your website will be free forever, but the user can pay to upgrade the site to achieve the speci...

Add Featured Image to WordPress RSS Feed

In our earlier tutorial, we have shown you how to add featured image or thumbnail to WordPress post . But the featured image would not be automatically displayed in the RSS feed. A filter need to be added to display featured image in RSS feed. In this article, we’ll provide the simple way to add featured image to WordPress RSS feed. Using add_filter() with a simple function, you can easily include post thumbnail in RSS feeds. Open the theme’s function.php file and add the following code in this file. // display featured post thumbnails in WordPress rss feeds function add_post_thumbnail_in_rss_feeds($content){     global $post;     if(has_post_thumbnail($post->ID)){         $content = '<p>' . get_the_post_thumbnail($post->ID) . '</p>' . get_the_content();     }   ...

Guide to Create Custom Page Templates in WordPress

In WordPress, page templates are a specific type of template file that are used for a specific page or group of pages. A page template only applies to pages, not for other content types. The page templates are used to change the look and feel of the pages. If you want to make a page different from other pages, create a custom page template. This tutorial shows you how to create custom page templates that can be assigned to the pages from administrative panel. Custom page template allows you to make the different layout for different pages. Template Hierarchy of Page Templates in WordPress When the browser requests a page, WordPress selects which template will use to render this page. As per the WordPress Template Hierarchy, page template files are looked like the following order. Page Template – WordPress looks for a custom template assigned to the respective page. If found uses it otherwise move to the next hierarchy. page-{slug}.php – If a custom template is not found, Word...

Why Should You Add Front-end Login Page in WordPress and How

Sending your WordPress website users to the default login page is fine when you’re running a site with just a handful of users. But, in case you’re running a membership site or other sites with large user base, making users access their profile page in the WordPress site’s admin panel via the default login page is something you should avoid. Wondering why? It’s a well-known fact that the WordPress login page appears to be bland and boring. No doubt, the login page serves as the central entry point for millions of WordPress sites worldwide. But what if your users don’t really need to access the dashboard? Well, users belonging to a membership site are not usually interested in accessing the WordPress admin dashboard (except when they need to create a post or perform edit operations). Thus, making those users open up the admin panel through the login page is likely going to prove bad for user experience. However, you can ensure to deliver an enhanced user experience (UX) by letting ...

WordPress – How to Display Breadcrumb without Plugin

Breadcrumbs are navigation links, used to display all the pages links leading from the homepage. Basically, it is placed at the top of the page and helps to backward navigation. In WordPress, breadcrumbs played an important role on the post page. Many WordPress plugins are available to adding breadcrumbs on your site. But we recommend you to use our simple code for display breadcrumb on your WordPress site. You can easily display breadcrumb on WordPress site without any plugin. In this tutorial, we’ll show you how to create and display breadcrumb in WordPress. Create Breadcrumbs: We’ve created a custom function called get_breadcrumb() to generate the breadcrumb links. You only need to add the get_breadcrumb() function code in functions.php file of the current theme. /**  * Generate breadcrumbs  * @author CodexWorld  * @authorURL www.codexworld.com  */ function get_breadcrumb() {     echo '...

WordPress – How to Display Most Popular Posts by Views

Displays the most viewed posts at the sidebar are very helpful for visitors to find out the most popular post of your site. This tutorial will show you the simple way to display the most popular posts by views without using any plugin. You can get the most popular posts using simple WordPress most viewed posts query. We’ll use the post Meta for storing the post views count. Using the stored Meta value, we’ll fetch the posts according to the views count. You need to modify only two files functions.php and single.php . After that, you can display the most popular posts using simple posts query. functions.php File Open the functions.php file of the activated theme and add the following code. setPostViews() function add or update the post meta with post_views_count meta key. /*  * Set post views count using post meta  */ function setPostViews($postID) {     $countKey = 'post_views_count';  ...

Add featured image or thumbnail to WordPress post

Featured image or post thumbnail is pretty useful for your WordPress site. Using this feature, you’ll be able to add the thumbnail to WordPress post. This article will explain about how to add featured image or post thumbnail in WordPress. All modern WordPress themes have already been embedded post thumbnail support. If you are a WordPress theme developer or want to build a custom theme, this tutorial will help you a lot for adding featured image support to your theme. Enable Featured Image and Set Thumbnail Size add_theme_support() function is used for enabling the featured image in WordPress. Using set_post_thumbnail_size() function, you can add the default featured image dimensions. Open the wp-content/themes/themeName/functions.php file and add the following code. /*  * Enable support for Post Thumbnails on posts and pages.  */ add_theme_support( 'post-thumbnails' ); //Set thumbnail dimensions se...

Speed up WordPress site instantly

In WordPress, lots of plugins are available and you can easily build a full-featured website with these plugins. These plugins and site’s theme include many JavaScript and CSS codes and it does affect your site speed. If your website takes the long time to load, most of the visitors can leave. According to the Google ranking algorithm, search ranking depends on site speed. So, the speed of your site influences the visitors and SEO. This WordPress optimization tutorial helps to speed up WordPress site and make WordPress faster instantly. Using two WordPress plugin, you can reduce site load time and improve speed. Follow our step by step guide mentioned below and load your site much faster. Before starting the optimization you can test website page speed. Some popular website speed testing sites are given below. Google Pagespeed Insights GTmetrix Pingdom Step 1: Install and configure W3 Total Cache Plugin W3 Total Cache is a popular WordPress plugin for easy Web Performance Optimization ...

MailChimp Integration in WordPress

Are you want to build the newsletter subscribers list and send your post updates to the subscribers? This tutorial will explain how can you manage your website subscribers with WordPress and MailChimp. MailChimp is one of the most popular email marketing service provider. Using MailChimp you can easily manage website subscribers and can send website updates via email to the subscribers. This tutorial helps you to integrate MailChimp with WordPress. Create MailChimp Account: To connect MailChimp with your WordPress site, you need a MailChimp account. Follow the below steps for creating a MailChimp account.  Go to the MailChimp website .  Create a free MailChimp account and you’ll receive an activation email.  You need to click on the activation link and complete some signup process.  After completed the signup process, you would be redirected to the MailChimp Dashboard. Create Subscriber List: Now you need to create a subscriber list.  Navigate to...