• Wordpress
  • Redirect non logged in user

    There are many plugins which can be used for redirection. We can use small code on our theme file rather using plugins. To redirect non logged in member to custom login page or to specific page or to normal login page, we can put the following code on our functions.php inside active theme: For is_user_logged_in, […]

  • Wordpress
  • How to show blank search on wordpress

    By default, wordpress do not search for blank. It redirects to the home page for blank search. To prevent this we can use pre_get_posts hook. We can use pre_get_posts action to manipulate the query variables for specific pages. We can modify $wp_query object before any results are returned. In this example, we are using pre_get_posts […]

  • Wordpress
  • How To Flush Permalink Structure in WordPress When Using custom Taxonomies …or what to do when WordPress custom Taxonomies show A 404 Page

    I have faced many times that permalink for custom taxonomy wont work, rather it shows a 404 error page. Suppose you have custom taxonomy named as video and want to display a link as http://www.yoursite.com/videos but it shows page not found. I have listed some of the ideas to make that workable: We can create […]