What is https and why you need it or not, the Internet is full of information on this topic. In short, you definitely need it. Even if your site interacts with the user only with its menu and links in articles, there still remains at least 1 reason to make the move – traffic from organic search engine results. Search engines prefer sites on https. What we need to have in order to implement our plan: Access to the domain control panel Access to the admin panel of our site…
Read MoreCategory: Tutorials
Auto refresh WordPress pages and post
WordPress posts and pages can be automatically refreshed using some tweaks in header of the website. Auto refresh functionality can be used in many ways depending upon needs.It can be used in landing pages to redirect to a particular page or posts after a certain interval of time. It can be used in other situations.for example, if the website is moved from root directory to a new directory and want the users to go to new website through root directory then simply create a page in root directory and write…
Read MoreHow to add Custom CSS in WordPress
There are different methods for adding custom CSS to your WordPress site. Custom CSS can be added for modify frond-end of your website or modify back-end(admin area) of your website. Modifying website front look is most common. Adding CSS to modify website front-end Add following line of code in functions.php of your theme to modify CSS in front-end of website. </p> <p>add_action(‘wp_head’,’custom_css’);</p> <p>function custom_css() {</p> <p> $output=”<style> .entry-content { background-color : #f1f1f1; } </style>”;</p> <p> echo $output;</p> <p>}<br /> 0 1 2 3 4 5 6 7 8 9 10…
Read MoreHow to check a user is logged in to WordPress
To check a user is login to WordPress is_user_logged_in() function can be used. </p> <p>is_user_logged_in()<br /> 0 1 2 is_user_logged_in() This function may also be used to add Login/Logout Button.
Read MoreHow to create a custom Shortcode in WordPress
Shortcode in WordPress are text macros which are used in content area of a Page or Post and May be Widgets. Shortcodes are created by using a collections of functions. You will learn about shortcode and How to create a custom shortcode as you proceed. What is a Shortcode? Shortcode are text macros or shorthand tags, which can be used in post or pages to display some codes or some custom texts. syntax : </p> <p>[myshortcode]<br /> 0 1 2 [myshortcode] Shortcode can be of two types: Self closing and…
Read MoreHow to create a Widget Area in WordPress theme
Widget Area is a part of a WordPress theme structure where Widgets can be added.Widget area is normally in right side of main content area or in left side of it.It can be created in header area of website,in footer area of website or in the middle of posts.Almost anywhere you want. Widget areas also referred as Sidebars. To add a Widget Go to Appearance > Widgets and Drag a Widget to a Widget Area.Here you can add available Widgets. Most new themes are widgetized now.check your theme Widgets Section…
Read MoreHow to create a Widget in WordPress 4.4
WordPress widgets are content blocks that can be used to add different type of content & features(for example, list of latest posts, a slider, a interactive map, a contact form etc) in the theme. Widget are used to control structure of theme by creating different layouts based on widget areas. Widgets can be added in pre-defined widget areas in a theme. A widget can be added/removed from Theme customizer or Appearance => Widgets as shown below. Adding widgets in Theme customizer Adding Widget in Appearance => Widget : You…
Read MoreHow to make menu links open in a new tab/window
By default a menu link in WordPress Menus opens in same window.What if you want a page ,category or other post type link in a menus open is new window/tab ? It is very easy to set a hyperlink to open in new tab/window in HTML. </p> <p><a href=”http://wpgyan.com” target=”_blank”>Link Text</a><br /> 0 1 2 <a href=“http://wpgyan.com” target=“_blank”>Link Text</a> In WordPress by applying some conditional PHP codes in menu it can be set to open to new window/tab. But In this post I am going to show you how to…
Read MoreHow to redirect to another page in WordPress
A page can be redirected to a new page or URL. There are different methods to achieve this. In this blog post we will deal with all these methods in details. Use of these methods depends upon different use cases. Sometimes HTML redirect work perfectly, in some cases JavaScript or PHP. There is a WordPress function which can also be used and I think it is best to use WordPress function. Here are different methods for redirect HTML Method In this method we will use meta redirect. Add following…
Read MoreHow to reset WordPress password at Localhost
In this article I will explain steps to Recover WordPress Admin password at localhost via phpMyAdmin Interface. Resetting password at live server of WordPress Self hosted blogs/websites are easy. What if you forget password of a localhost installation? To reset password at localhost some manual work needed to be done. On localhost installations WordPress Reset password function don’t send a reset e-mail to your e-mail.Since most default localhost server install has not configured to send a e-mail. So, How to deal with it? Follow these steps to recover Lost…
Read More