Wordpress Tutorials

How to create custom template in WordPress

How to create custom template in Wordpress




Some specific pages of website required different types of template or layouts. In WordPress we have the ability to create/change the template of page in admin. So today I am showing you how to create custom template page in WordPress. By default your WordPress theme uses page.php as a default template for every page which makes the page look a certain way. You can create your custom template which has different …

Continue reading




How To Display Related Posts In WordPress

How To Display Related Posts In WordPress




Allowing users to navigate throughout your site from post to post makes for longer browsing time on the site. You can display related posts at the end of the post in WordPress so your visitors more engaged with your site and you get a chance that they will convert into a lead or a sale. So in this post I will tech you how to display related posts in WordPress …

Continue reading




Require Users To Login Before Viewing Post

Require Users To Login Before Viewing Post




Some of websites require login before viewing some pages to hide some important data from anonymous users. So if you also want to require users to login before viewing post in WordPress, here is the solution. Just copy the following code in functions.php file of your theme. Now open your theme’s single.php file and copy following code before get_header(); line like: Currently we have just two post ids to require …

Continue reading




Specific Post Types in Search Results

Specific Post Types in Search Results




As I have already showed you how to disable the search feature in WordPress and how to exclude pages from WordPress search results by modifying the functions.php file of theme. Now In this tutorial I will display specific post types in search results of WordPress by modifying in functions.php file. Just open your functions.php file of active theme and add the following codes: You can add any post types in …

Continue reading