Posts

Showing posts with the label Wordpress Plugins

Force Users To Login Before Reading Posts in WordPress

Image
Some WordPress CMS users might want to force users to Login before they read posts. So we have h simple tutorial for them. WordPress has a built-in function which can help you to do that. The function auth_redirect() , this is how it works: When it is called from a page, it checks to see if the user viewing the page is logged in. If the user is not logged in, they will be automatically redirected to the login page. The user is redirected in such a way that, upon logging in, they will be sent directly to the page they were originally trying to access. By using this function, we can implement below code that check if post is restricted or not, and redirect users to login page if needed. Just paste the following code into your theme’s functions.php file: function tf_force_login() { global $post; if (!is_single()) return; $ids = array(188, 185, 171); // array of post IDs that force login to read if (in_array((int)$post->ID, $ids) && !is_user_logged_in()) { a...

5 WordPress Plugins To Kickstart Your New Blog

Image
So you have just set up your  WordPress  blog and now want to add some cool plugins to it. Today we are going to share 5 awesome plugins to supercharge your new WordPress blog. The plugins we are sharing below are some most essential plugins for wordpress bloggers of the new generation. it’s extremely difficult to find the best WordPress plugins as there are over 30,000 plugins available in the WordPress Plugins Directory. We've tried to give you best 5 WordPress plugins for newbie bloggerss for WordPress. You may not use too much plugins on your wordpress site as they may slow down your blog, Most Essential 5 WordPress Plugins We are giving you all the essential 5 wordpress plugins. 1. Jetpack by WordPress.com Jetpack is a super-plugin that brings the power of WordPress.com cloud to your self-hosted WordPress Blog. You need a WordPress.com account to enjoy all the features of this plugin. It’s a must-have with over 25 unique features to turbocharge your blog like Fre...

How to Display a User’s IP Address in WordPress

Image
Today i am going to share with you a sweet WordPress tutorial that will enable your WordPress blog to display visitor's IP(Internet Protocol) address using a ShortCode. Add IP detection to your Wordpress Blog: Only Thing you need to do is copy and paste below code snippet in your functions.php file  // Display User IP in WordPress Blog function get_the_user_ip() { if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) { //check ip from share internet $ip = $_SERVER['HTTP_CLIENT_IP']; } elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { //to check ip is pass from proxy $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip = $_SERVER['REMOTE_ADDR']; } return apply_filters( 'wpb_get_ip', $ip ); } add_shortcode('show_his_ip', 'get_the_user_ip'); Next thing you need to do is add the following shortcode in your post, page, or in a sidebar widget. [show_his_ip] Now your visitors will see the IP address from wher...

Top 5 Author Box Plugins For Wordpress

Image
Hello Bloggers !!!! So you want to show who you are, where you live and how to get to you below every post of your awesome site. Then you are at right place i will tell you about some cool WordPress plugins. Now a days many of WordPress blog have author box at end of each post. Now it’s becoming very popular to have author box in WordPress blog. 1. WP Biographia   This plugin allows you to add a customisable biography to posts, to RSS feeds, to pages, to archives and to each post on your blog's landing page as well as via a widget in your sidebar. It integrates out of the box with the information that can be provided in each user's profile and supports custom post types. Display of the Biography Box can be hidden on a global or per user basis for posts, pages and custom post types as well as on a per category basis. 2. Better Author Bio This is another good author box plugin i would recommend,  it don’t require any coding. Its just simple, neat and clean :D. Here are fe...