Tuesday, 26 April 2016

Creating custom Sidebar Multiple Widgets -Part2

Previous Tutorial -> http://1wmedia.blogspot.in/2016/04/creating-custom-sidebar-widgets-part1.html


In this tutorial, we will see how to create multiple widgets, with register_sidebar function with our custom function.

1. Open your functions.php,  remove the old register_bar function code, Add the following one, Instead of old one. Then save the file.

<?php
function sidebar_widgets( $widget_name, $widget_id, $widget_description){
register_sidebar(array(
        'name' => __($widget_name),   
        'id' => $widget_id,
        'description' => __( $widget_description ),
        'before_widget' => '<div class="widget">',
        'after_widget' => '</div>',
        'before_title' => '<h3>',
        'after_title' => '</h3>'
    ));

}

sidebar_widgets("Page Sidebar", "right-sidebar", "Sidebar Widgets");
sidebar_widgets( "First Sidebar", "first-sidebar", "This is first sidebar");
sidebar_widgets( "Second Sidebar", "second-sidebar", "This is Second sidebar");


?>


2. Here our custom function name is "sidebar_widgets". In this function, we are creating three variables namely,  $widget_name, $widget_id, $widget_description.

3. We will pass these variables  into register_sidebar function. For example,

'name' => __($widget_name),  

Refere point no 1.

Same for other two.  But we didn't create variables for 'before_widget' and others..

4.  After this we have called the function to create widgets with our custom names, ids, descriptions.

For example,

sidebar_widgets("Page Sidebar", "right-sidebar", "Sidebar Widgets");

The above code creates the sidebar with the name  "Page Sidebar"

if you call  the sidebar_widgets function with different name,id and description , then it will create another sidebar.  Here we have created 3 sidebars .  Refer point no 1.

5. Now view widgets in dashboard -> You will see 3 widget sidebar.

7. Add some widgets to all 3 sidebars and save it.

8. Now we will call / add this widget in your template or wherever you want.

9. In our case we will add this into page-sidebar template. So open the page-sidebar.php file.

10. Paste the following code below  "<div class="col-md-4" > "


<p><?php if( dynamic_sidebar('right-sidebar')); ?></p>
 <p><?php if( dynamic_sidebar('first-sidebar')); ?></p>
 <p><?php if( dynamic_sidebar('second-sidebar')); ?></p>



11. Here "right-sidebar" is an id for "Page Sidebar" , we have created earlier in register_sidebar function (point no 1). remaining are same.

12. Now view the page -> with Sidebar Template selected.

13. You can see the sidebars with multiple sidebar.

 14. Here, we are doing one more step to separate the sidebar files.

15. Create sidebar.php in your themes folder and save it.

16. Now go to page-sidebar.php file, cut the following code and paste it into the sidebar.php file.

<div class="col-md-4" >

 <p><?php if( dynamic_sidebar('right-sidebar')); ?></p>
 <p><?php if( dynamic_sidebar('first-sidebar')); ?></p>
 <p><?php if( dynamic_sidebar('second-sidebar')); ?></p>
 </div>


17. Now add the following code into the page-sidebar.php file, instead of the above code .

<?php get_sidebar();?>

18. Save both files. That's all. Now you sidebars work from sidebar.php file. If you done anything at sidebar.php file, then it will reflect at your page-sidebar template.

Refer the video:





Monday, 25 April 2016

Creating custom Sidebar Widgets - Part1

Previous Tutorial -> http://1wmedia.blogspot.in/2016/04/creating-sidebar-template-by-using.html

In this tutorial we will see how to create sidebar using register_sidebar function.



1. Open your functions.php file from your themes folder.
2. Add the following code to widget support for your theme.

<?php

//adding Widget:

add_theme_support( 'widgets' );

?>


3. Open Dashboard -> Appearance -> Here you can see widgets.

4. Now go to your functions.php and add the following code for creating or registering sidebar


<?php

register_sidebar(array(
        'name' => 'Sidebar Name',   
        'id' => 'sidebar-id',
        'description' => 'This is description of Sidebar Name',
        'before_widget' => '<div class="widget">',
        'after_widget' => '</div>',
        'before_title' => '<h3>',
        'after_title' => '</h3>'
    ));

?>


save the functions.php

5. name -> naming the sidebar,  id -> to call/add the sidebar wherever you want by using this id,  description -> for  giving the description of the sidebar.

6. Now view widgets in dashboard -> You will see one widget with following name, "Sidebar Name"

7. Add some widgets and save it.

8. Now we will call / add this widget in your template or wherever you want.

9. In our case we will add this into page-sidebar template. So open the page-sidebar.php file.

10. Paste the following code below  "<div class="col-md-4" > "


  <p><?php if( dynamic_sidebar('sidebar-id')); ?></p>



11. Here "sidebar-id" is an id, we have created earlier in register_sidebar function (point no 4)

12. Now view the page -> with Sidebar Template selected.

13. You can see the sidebars.

Please refer the following video:




Tuesday, 12 April 2016

Creating sidebar template by using page.php

If you want to read the previous tutorial, Please click the following link. http://1wmedia.blogspot.in/2016/04/creating-pagephp-default-template-and.html

Ok. Now we will move to topic.

In this tutorial we will learn how to create custom template and sidebar template (We will see how to create widget, sidebars in the next tutorial.)

If you want to create a custom template just do the following steps.

 1. Create a new php file (In our case, save as the file page.php into page-sidebar.php) and add the following code.

?php
/*
Template Name: Your Template Name here
*/

?>

2. There is no space between : and Template Name in the above code

3. In our tutorial, We will use our template name which is "Sidebar Template" instead of "Your Template Name here"

4. Now save it. That's all for creating new or custom template in WordPress.

5. Now add the following code or replace page-sidebar.php code with the following:

<?php get_header(); ?>


    <!-- Carousel
    ================================================== -->
    <div id="myCarousel" class="carousel slide" data-ride="carousel">
      <!-- Indicators -->
    
      <div class="carousel-inner" role="listbox">
        <div class="item active">
          <img class="first-slide" src="<?php bloginfo('template_directory'); ?>/images/avoid when blogging.jpg" alt="First slide">
         
        </div>
       
      
      </div>
     
    </div><!-- /.carousel -->


    <!-- Marketing messaging and featurettes
    ================================================== -->
    <!-- Wrap the rest of the page in another container to center all the content. -->

    <div class="container marketing">

      <!-- Three columns of text below the carousel -->
      <div class="row">
     
      <div class="col-md-8" >
     
      <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
      <div class="container">
<h1> <?php the_title();  ?>  </h1>
</div>
     
  
                            <p><?php the_content(); ?></p>
                       
                       
   

              <?php endwhile; else : ?>
    <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>

</div>

 <div class="col-md-4" >

 <p>This is our sidebar space</p>
 </div>

          
      </div><!-- /.row -->

      <hr class="featurette-divider">


     <?php get_footer(); ?>

6. Now save the file in theme folder and move to your Dashboard -> Pages -> Edit a page -> Page attributes -> Template -> here you will see a new template with our template name. Sidebar Template is our template here.

7. That's all

Video tutorial:




Friday, 1 April 2016

Creating page.php (default Template) and (Parent Menu - adding link - bootstrap-correction) -Step 8

Previous Tutorial Link: http://1wmedia.blogspot.in/2016/03/how-to-create-bootstrap-wordpress-theme_24.html

In this tutorial we will see how to create default template for WordPress page.

1. Just create a new file named page.php on your theme folder.

2. Now add the following code and save it.


<?php get_header(); ?>


    <!-- Carousel
    ================================================== -->
    <div id="myCarousel" class="carousel slide" data-ride="carousel">
      <!-- Indicators -->
    
      <div class="carousel-inner" role="listbox">
        <div class="item active">
          <img class="first-slide" src="<?php bloginfo('template_directory'); ?>/images/avoid when blogging.jpg" alt="First slide">
         
        </div>
       
      
      </div>
     
    </div><!-- /.carousel -->


    <!-- Marketing messaging and featurettes
    ================================================== -->
    <!-- Wrap the rest of the page in another container to center all the content. -->

    <div class="container marketing">

      <!-- Three columns of text below the carousel -->
      <div class="row">
     
      <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
      <div class="container text-center">
<h1> <?php the_title();  ?>  </h1>
</div>
     
        <p class="content">
                            <?php the_content(); ?>
                        </p>
                       
   

              <?php endwhile; else : ?>
    <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>
          
      </div><!-- /.row -->

      <hr class="featurette-divider">


     <?php get_footer(); ?>



3. Now open the extra_js.js file inside the js folder.

4. Modify the below code with the existing one( remove the old one). It's for linking parent menu item when clicking. If you didn't understand, just refer the video.


jQuery(function($) {
$('.navbar .dropdown').hover(function() {
$(this).find('.dropdown-menu').first().stop(true, true).delay(250).slideDown();

}, function() {
$(this).find('.dropdown-menu').first().stop(true, true).delay(100).slideUp();

});

$('.navbar .dropdown > a').click(function(){
location.href = this.href;
});

});



5. That's All. Now your pages are available with new default template. You can edit pages. Just with Page Edit.

Video Tutorial :







Friday, 25 March 2016

25 Benefits / Features of WordPress



WordPress is one of the best CMS (Content Management System) framework in the world.  25% of websites are now powered by WordPress. Now we will see the benefits / features of WordPress.

1. WordPress is very simple and user friendly.
2. Most of the server companies allowing WordPress single click installation.
3. Thousands of themes and plugins are available in the market for WordPress.
4. It has big community support.
5. WordPress (framework) is 100% open source. But not all themes, plugins and working charges.
6. You can develop your site easily in the server or live. You need not to develop separately on local server.
7. Backup is easy process(Importing and exporting pages and posts).
8. It supports multiple languages.
9. Multisite  is very easy to configure. Need not use many WordPress installation for every site. Single WordPress installation is enough for many sites. Example: wordpress.com
10. You can handle images, videos, attachments easily.
11. Configuring content or formatting text is easy.
12. You can control your site at anywhere.
13. Password protection for posts.
14. Sticky posts.
15. You can save drafts, need not to publish after finishing the post. You can publish whenever you want.
16. Drag and Drop administration for menus.
17. Widget based control for sidebars.
18. SEO is very easy in WordPress.
19. You can create own templates if you need.
20. You can create unlimited pages and posts.
21. Many themes are mobile friendly and responsive. You need not to create separate mobile site for your website.
22. WordPress saves your time. Developing a site is very easy comparing with other frameworks.
23. WordPress gives you updates for new version.
24. You need not a programmer, after the site development. You can maintain by yourself at anywhere and anytime.
25. You can get all updated codes and explanations from codex.

Thursday, 24 March 2016

How to create a Bootstrap WordPress Theme dynamic submenu - Step 7

In this tutorial, we will learn how to add sub menu. Previous tutorial -> http://1wmedia.blogspot.in/2016/03/how-to-create-bootstrap-wordpress-theme_15.html


1. First click the following link and get all the code you want -> https://gist.github.com/setola/3765640

2. Add the functions.php code from Extended Walker and add it to your functions.php file and save it.

3. open your header.php.

4. Add depth value and call wp nav walker inside the $args array. (please refer the video)

'depth' => 0,
 'walker' => new BootstrapNavMenuWalker()

and hit save.

5. Now open the style.css and add the following code and save the file.

/* dropdown */
.dropdown-menu {
    margin: 0px auto;
}
.dropdown-menu .dropdown-menu {
    left: 100%;
    top: 0px;
}
/*  shows the dropdown on hover*/
.navbar ul.nav li:hover > ul.dropdown-menu {
    display: block;  
}
/* before and after */
.navbar .nav > li > .dropdown-menu::before, .navbar .nav > li > .dropdown-menu::after {
    display: none;
}



6. Now get the Javascript code (open-on-mouseover.js ) from this link -> https://gist.github.com/setola/3765640

7. Create a Javascript  file with name(for example extra_js.js) , Put the code and save it inside the js folder in the themes folder.

8. Now call or enqueue the Js file with following code at functions.php .It should ne inside the function newsite_js() (Please refer the video)

wp_enqueue_script( 'extra_js', get_template_directory_uri() . '/js/extra_js.js', array('jquery'), 'booostrap.min.js', '' );

9. Now move to appearance -> menus on the Dashboard -> Add submenus -> Now all submenus will work properly.

10. That's all.

Video Tutorial:








 


Tuesday, 15 March 2016

How to create a Bootstrap WordPress Theme (dynamic menu) - Step 6

Before reading this tutorial, Please read / watch previous tutorial.

Now we will move to our topic.
  1. Put the below code instead of the body tag like this. (header.php)
    Code:
    <body <?php body_class(); ?>>
  2. Now add the following style into the style.css file.
    Code:

    .admin-bar .navbar-static-top{
        margin-top: 35px;
    }

    This is for giving the top margin in the admin bar nav menu (refer video)
  3. Add the following code at functions.php file just before the ?> tag.
    Code:

    //adding menus:

    add_theme_support( 'menus' );

    function register_newtheme_menus() {
        register_nav_menus(
            array(
                'main-menu'    => __( 'Main Menu' )
            )
        );
    }
    add_action( 'init', 'register_newtheme_menus' );
  4. Now remove or add comment the <ul> codes inside the header.php file.

    Starts from <ul class="nav navbar-nav"> to </ul> just before the </div> tag (refer video).
  5. Now add the following code instead of the above one.
    Code:

     <?php
                $args = array(
                  'menu'        => 'main-menu',
                  'menu_class'  => 'nav navbar-nav',
                  'container'   => 'false'
                );
                wp_nav_menu( $args );
              ?>
  6. Now go Appearance -> menus -> create new menu -> save -> check the Main Menu (refer video)
  7. Now your dynamic menu will be added instead of the static menu.

Monday, 14 March 2016

How to create a Bootstrap WordPress Theme - Step 5


How to use ATM safely?


We are using ATM's for taking money and online transaction. You should follow some instructions to avoid robbery and attacking.

  • Do not change your ATM to take money. Always use the same ATM. Change the ATM only necessary or important reason. If you use the same ATM, you can easily find the changes inside and outside the ATM.
  • Use the ATM's at bank. It avoids unwanted criminal attacks. Avoid street ATM's if it seems unsafe.
  • Do not use the ATM's without security guard and suspicious looking.
  • Watch inside the ATM, if it has or if you found any extra or unwanted camera's, card or cash trapping devices, do not put your card inside the ATM machine. Just get away from there.
  • Do not ask help to anyone to take money or Do not allow unauthorized people to take money.
  • If you lost your card, inform immediately to your bank and lock the card. You can do this from your bank website.
  • If your card locked at ATM machine, inform your bank before leaving the ATM machine.
  • Do not believe the rumors like " If you enter your pin number reverse, then it will summon police" Click read more about this
  • Do not share your PIN number to anyone. And do not store your PIN number at mobile phone.
     
  • If someone attaching you in the ATM, understand the situation carefully and try to fool the attacker. Do not do any unwanted action. If you lose your money, you can earn it. But if you lose your life, you could not get it back.






Saturday, 12 March 2016

How to save / protect my bank account from hackers?


If you are using net-banking or some other online transactions with your bank account, you should  be very careful about hackers. Here are some tips to avoid hackers and their attacking activities.

Protection from your devices:
  • It should start from your Personal computer, Laptop, Mobile Phones, Tablets and other hand devices.
  • Keep your devices clean with Anti Virus software. 
  • Keep the devices with strong password. Do not share the passwords anyone.
  • Your Operating System (OS) should be updated always.
  • Do not install unwanted and unauthorized  Software's and Apps into your mobile/computer or devices.  Some of them may be Spywares, So they (hacker) can easily take your details from your devices.
  • Use authorized bio metric applications to devices like finger print controlling, voice controlling etc.
  • Always turn on Firewall into your system.
  • Keep the browser and bank Application software's updated
  • Do not open or operate your banking software's at public places and public network (Free Wifi). 
  • Change your device passwords often, at-least every two weeks.
  • Keep your devices away from children.
  • If you are going to sell or exchanging your devices like mobile, laptop, You should delete / format  your confidential details on the devices. 
  • Always delete your cookies / histories on your browser.
Protect your Email: 
  • Do not share your email passwords to anyone.
  • Enable some features like two step verification. When Sign in, you will receive a pin number to your mobile. You need both password and pin number to login. For more.
  • Do not respond SPAM mails.
  • Be aware of lottery frauds. Never respond them. They will send something like this, "You won $10000000/-. Please give your details to credit the amount into your account. We need the following details...etc."
  • Always give your email address to the authorized person, company, websites. Because someone will take your email and use it for unwanted jobs (They will sell your email id for business promoting or marketing companies). 
  • Be aware of your email settings like, Filtered and Blocked addresses, Forwarding and POP/IMAP. Because If someone hacked your password or email, first they will try to change your settings of email and block your important receiving mails and forward it to their email id.
  • If you receiving any mails from bank with new offers, please contact your bank directly. Someone will send mail like this and try to get your details. If you click the link, sometimes it will go to fake site, exactly looking like your bank site . So be alert and check your bank url is correct.
Protection from bank:
  • Check / Watch your bank account  transactions often.
  • Do not give your credit / debit card details to anyone. 
  • When online purchasing, be sure the website should be an authorized website like Amazon.
  • Do not enter your credit card details on all websites.
  • Do not store your ATM pin, CARD details, Password's on your mobile phones.
  • If any new offer comes from bank, go to your bank, confirm it directly or confirm by phone.
  • If your bank says to use this browser / app / software, then use the particular browser / app / software.
  • Touch with your bank. Do not believe rumors, unwanted news, phone calls.
  • If someone call you and say "I am the Manager from your bank, I need to confirm your details, so please give your PIN number, password etc" . Do not respond this person. Banks or Managers will never call and ask like this.
  • Keep safe your digital signatures.
  • Please avoid online transactions on public browsing centers or others devices ( may be your friend device)

Friday, 11 March 2016

How to create a Bootstrap WordPress Theme? - step 4

If you didn't read the third step, then click here. Ok. Now we will move to the third step.

1. In this step, first create the Js files for the theme from the demo.
Save the file at js folder which is available at your themes folder. or create the new one and save them with source code

2. Remaining Js files - Direct linking url -> you need not to save this -> we will do this at functions.php

3. Add the following code into functions.php file, Just before the " ?> " .I mean before the PHP closing tag.

function newsite_js() {

    global $wp_scripts;

    wp_register_script( 'html5_shiv', 'https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js', '', '', false );
    wp_register_script( 'respond_js', 'https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js', '', '', false );

    $wp_scripts->add_data( 'html5_shiv', 'conditional', 'lt IE 9' );
    $wp_scripts->add_data( 'respond_js', 'conditional', 'lt IE 9' );
   
    wp_enqueue_script( 'IE_emeulationmode_js', get_template_directory_uri() . '/js/ie-emulation-modes-warning.js', array('jquery'), '', false );
   
    wp_enqueue_script( 'Google_ajax_js', 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', '', '', true );
   
    wp_enqueue_script( 'bootstrap_js', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '', true );
   
   
    wp_enqueue_script( 'holder_js', get_template_directory_uri() . '/js/holder.min.js', array('jquery'), '', true );
    wp_enqueue_script( 'IE10_js', get_template_directory_uri() . '/js/ie10-viewport-bug-workaround.js', array('jquery'), '', true );

}
add_action( 'wp_enqueue_scripts', 'newsite_js' );

4. Now save the functions.php file

5. Download the Bootstrap from the following link.

http://getbootstrap.com/getting-started/#download

6. Extract the Bootstrap file, find "fonts" folder. Copy the "fonts" folder and paste into the theme folder.

7. Now our scripts are activated.

8. You can verify - By your slider moving and menu working.

Video Tutorial:



Tuesday, 8 March 2016

Mobile apps eating mobile memory - Is there any permanent solution or suggestion?


In this world, most of us are using smart phones. Every mobile user facing memory problem with their apps. Here I like to give some suggestions for this problem. If anyone find or invent an app or software for this, I would happy.

Problems:

1. Our memory on phone is low comparing with desktop and laptop.
2. Second is RAM memory on phone is not enough.
3. Most of the mobiles easily lost their performance.

Suggestion:

1.  If any Software / App controls all apps in a single way, then It would be better. It should be work like Web browser, website concept. From a single browser, we can access multiple websites, likewise if we have single app, then we can access the all apps from the server.

2. Store the apps on server or cloud server or virtual server, access the apps from a single software like browser.

3. It avoids to store the apps on the mobile. Need not to increase the memory or space on mobile.

4. Or when accessing app, space should be created outside the mobile. For example, every tower station should have some space or memory. When accessing app, some space should be allotted virtually to the mobile from the tower station or some other virtual space. Once the app closed, virtual space should be deleted. This is one type of solution for increasing RAM memory.

If you have any other solution or ready-made App, (Not for Desktop, We have many App controllers for Desktop and Laptop) Please comment. I like to add your suggestions in this article.

Monday, 7 March 2016

How to create a Bootstrap WordPress Theme? - step 3

If you didn't read the second step, then click here. Ok. Now we will move to the third step.

1. Create two new folders at your themes folder namely css,js.

2. In css folder, create css files namely bootstrap.min.css and ie10-viewport-bug-workaround.css.

3. Click the following link," view-source:http://getbootstrap.com/dist/css/bootstrap.min.css " copy and paste the code at bootstrap.min.css

4. Click the following link, "view-source:http://getbootstrap.com/assets/css/ie10-viewport-bug-workaround.css " copy and paste the code at ie10-viewport-bug-workaround.css file.  Save both files.

5. Now click and open js folder. Create js file named ie-emulation-modes-warning.js

6. Click the following link, "view-source:http://getbootstrap.com/assets/js/ie-emulation-modes-warning.js " copy and paste the code into ie-emulation-modes-warning.js, Save the file.

7. Now add the following code at header.php file just before the "</head>" tag

<?php wp_head(); ?> .  Save header.php file.

8. Then open the footer.php file, add the following code just before the "</body>" tag

<?php wp_footer(); ?> . Save footer.php file.

9. Create a new file at your theme folder, named functions.php. then add the following code into the file, Save it.

<?php

function newsite_styles() {

wp_enqueue_style( 'bootstrap_css', get_template_directory_uri() . '/css/bootstrap.min.css' );
wp_enqueue_style( 'main_css', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'Ie_css', get_template_directory_uri() . '/css/ie10-viewport-bug-workaround.css' );


}
add_action( 'wp_enqueue_scripts', 'newsite_styles' );

?>


10. Open the style.css file and add the following code.

view-source:http://getbootstrap.com/examples/carousel/carousel.css

Do not delete the above comment line on the style.css. Add the code below the comment line. And save it.

11. Now view the site. Some styles are added. But we have added styles and scripts for header only. We will do footer styles and scripts in next lesson.


Video tutorial:







Google Apps for your business


Do you need good server for your business Email? Are you struggled with your current webmail? Are you feel very hard to use your webmail or your business email. This is the time to change Google Apps Program.

If you are a Gmail user, it's very easy to you. Just sign up and start with FREE trail. All you need is configure your MX record on the server. Google Apps automatically take your business emails into their server.

You can login from Gmail with your business email id like this yourname@domainname.com. You can get some other features of Google apps, They are given below.
  1.  Gmail
  2.  Calender
  3.  Drive
  4.  Docs
  5.  Sheets
  6.  Slides
  7.  Sites
  8.  Hangouts
For Indians - ₹150/user/month

Link : https://goo.gl/e5zDh7
Type the below Coupon Code get 20% offer (code valid only for Indians)

9KFJXEKQJAQT4C
ALQPEG4NFAHKTJ



 

Sunday, 6 March 2016

How to voice typing in Google Docs? - Without keyboard


Google Doc supports voice typing. You can do this by following steps.
  1. Voice type is available or support on Google Chrome Browser.
  2. Create a new doc file or open a new doc file on Google drive.
  3. Then click "tools" on menu.
  4. Click "Voice typing "
  5. Now voice typing box will appear.
  6. Select your language on the voice typing box.
  7. Click microphone button.
  8. Then speak, whatever you want on your language. 
  9. Google docs recognize your voice and converts your speech to text.
That's all.

Now see the video :


Saturday, 5 March 2016

How to secure WordPress websites?



No one like their website is hacked by someone else. Securing a WordPress website is not an easy job. In this article we will see how to secure our WordPress website and what are steps we need to take if our website is hacked.

What types of WordPress websites / activities - will hacked easily?
  1. If you have lots of vulnerabilities available on your site, then your website is 90 to 100% chance to hack
  2. Poor password like your pet name, phone numbers, easily guessing passwords (car number, lucky number)
  3. If you didn't have HTTPS on your website URL.
  4. robots.txt file enabled on your site
  5. Uploading your files without scanning by Virus scanner
  6. Sharing passwords to others without proper guidance
  7. Using same password for long time
  8. Installing FREE and unauthorized plugins, themes
  9. Forget to changing passwords often.
  10. Forget to changing passwords after the development (cpanel, wp-admin)
  11. Forget to update security patches on theme, plugin, WordPress.
  12. Social Engineering -> Some of them will talk with you at social media or somewhere else, And getting your password from your speech. 
  13. Poor Web hosting, and not updating hosting security patches
  14. Showing your domain details.(whois.com, you can find domain details, So hide or secure them when registering domain)
  15. Bad encryption system at your database password
  16. Using WordPress files in the same folder, You can separate them some other sub folder.
  17. Giving full access permission to all files
  18. WP_DEBUG is enable after the development
  19. Allowing spam comments on your post and page.
  20. Disabling firewall
  21. Accessing your WordPress admin at FREE wifi network, or some poor networking system
  22. Giving direct wp-admin link. You can use  or set alternate link instead of wp-admin.
  23. Themes and plugins which is developed security not in mind.
How to avoid and secure your WordPress website:
  1.  Always place your files at good hosting companies
  2.  Keep one copy of your site files on your hardisk
  3.  Install this plugin "Wordfence Security". It helps to protect your WordPress site.
    Link: https://wordpress.org/plugins/wordfence/
  4. Limit access control - wp-admin
  5. Do not use untrusted plugins and themes
  6. Use hard or complex passwords. Change it every month or two weeks
  7. Be clean your computer with virus scanner. Scan whenever you need.
  8. Don't compromise to update WordPress, themes, plugins.
  9. If find any bugs, please report it here .
  10.  Find your webserver and network vulnerabilities, try to resolve them as soon as possible.
  11. Use SFTP to send files.
  12. Give proper file permissions. Don't compromise with permissions
  13.  Change your default admin URL.
  14.  Put your WordPress files on separate folder.
  15. Disable file editing with the following code.
    define('DISALLOW_FILE_EDIT', true);
  16. Use some good firewall plugins like iThemes Security, All in One WP Security, WordFence, Sheild 
  17. Do not allow any unauthorized access to your Cpanel, FTP, wp-admin, Database.
  18. Do not access your Cpanel/Admin at different computers, public places, browsing center. 
  19. Disable debug code at wp-config (set as false)
  20.  Monitor your website through security plugins
  21. Learn about social engineering, it helps you how they are getting passwords from you.
  22. Care  PHP and WordPress version. If there any updates and conflicts, do it properly.
  23. Learn something about hackers, intruders, crackers.


Friday, 4 March 2016

How to create a Bootstrap WordPress Theme? - Step 2

Before reading this tutorial, Please view the step -1 or view the video tutorial : https://www.youtube.com/watch?v=RdokBuEG8Y4

Ok. We will move the second step now.

1. Create another two files in theme folder : header.php and footer.php

2. Now view the following source code, copy and paste it into the index.php file  and save index.php: view-source:http://getbootstrap.com/examples/carousel/

3. From   index.php , cut the code from  "<!DOCTYPE html>" to -  before this comment line
 
<!-- Carousel
    ================================================== -->
 

Paste the code into header.php file and save header.php file.

4. Please add the following code at top of the index.php file to call the header.php file

     <?php get_header(); ?>   and save the index.php.


5. Finally, cut the footer content from index.php file which starts from " <!-- FOOTER -->" to "</html>" . and add or paste the code to footer.php. Save footer.php

6.  Please add the following code at bottom of the index.php file to call the footer.php file

     <?php get_footer(); ?>   and save the index.php.

7. Now view the site. Your contents will added without styling.

View the following video for this text tutorial.






Wednesday, 2 March 2016

Some common mistakes - should avoid when blogging




If you are starting or running a blog, you should avoid following mistakes. This helps you to make more money as well as success in your blogging.


1. Search Engine Optimization:

Most of the bloggers are having good knowledge in their subject. But they don't know how optimize the SEO (Search Engine Optimization).  Here are some tips :
  • Create Google analytics code and tracking id for your blog and insert it.
  • Don't forget to submit your domain name at Google URL submission
  • Also submit your domain name to some other search engines like Yahoo, Baidu etc
  • Do some keyword research and implement them in your blog
  • Update and post new posts often. Search engine loves new and updated contents.
  • Put some attractive pictures to post.
  • Create Google map to your business location.
  • Hosting is very important, Don't buy poor hosting plans, If you are using WordPress, then buy WordPress hosting.
  • If you are running WordPress blog, install Yoast plugin and configure it.
  • Your contents should be relevant to your blog and fresh.
  • Do the software and framework updates whenever it needs.
  • Create Social pages and invite your friends to join. Post your article links to your social pages.
  • Don't try to increase traffics informal way.
  • Try Google Adwords, LinkedIn ads, Facebook ads to increase traffic.
2. Copying Contents from Other Bloggers:

Most of the people don't like to read the contents or information twice. It gets them bored, and they never come to your blog again. Your topic should be new and your own writing. Try to find the new interesting topic and write about it. How to find new topic?
  • If you have subject knowledge, then automatically you find new topics.
  • So read a lot from internet or books. Then write, based on your own view and thought.
  • Go outside, find some groups related to your blog, join the group and share your knowledge. You will get more shared knowledge from them.
  • Watch TV news or magazines which is related to your blog. This helps you to increase more about the subject.
  • Join a journalism course. It helps you how to write new topics.
 3. Putting maximum and unwanted ads:

If you put 10 or more ads in single page, then your readers willing to move some other sites or blogs. Here are some tips how to put ads in your blog.
  •  Don't put popup and clickable ads (Inside your content)  in your blog.
  •  Put maximum two to three ads in a single page or post.
  •  Avoid / Remove unwanted ads.
  •  Avoid to place too many ads inside or between the contents/posts.
  •  Free some pages/posts without ads.
4. Reply the comments: 

Don't forget to reply the comments you have received. If not, then users or visitors consider  - you are inactive. It may looks simple one. But its very important to every blogger.

5. Do not use hard English / Language :

Your visitors may be all over the world. So do not use hard words(unfamiliar, unpopular), idioms and phrases, high level grammatical sentences in your writing. It will annoying your visitors and they never like to read your posts. So use simple, easy, familiar words in your writing.

6. Posting articles without consistently:

Many bloggers starting and posting articles eagerly at starting stage. But after few months, they are not interested and dry, giving long gap in their postings. So take some time between your postings and do not run away from your blog. Find some interesting topics and write regularly.

7. Close or Shutdown the blog permanently before getting earnings: 

This very important than others. Because, you have invested some time and money in your blog. You should maintain your blog at least one year. Many bloggers are creating blogs for earnings. If want to earn from your blogging, find some alternate methods. Do not always focus on same methods.

Try something like this:
  •  If you are not earning from Adsense, then try alter methods, like infolinks
  •  Try some affiliate marketing like CPA .
  •  Consult with famous bloggers or join a course something like how to blogging?
  •  Get feedback from your readers, friends then improve your writing as per the feedback.







Thursday, 25 February 2016

How to delete an account from Google analytics ?

Here are some steps to delete an account in Google analytics.

  1. Sign In to your Google Analytics account
  2. Click "Admin" on menu.
  3. Three column layout will appear, They are "ACCOUNT, PROPERTY, VIEW" .
  4. Under the ACCOUNT, select your account you want to delete.
  5. When selecting, related property will automatically selected on PROPERTY, If not, select by your own.
  6. Under PROPERTY, click Property Settings.
  7. In Property Settings page, click "Move to Trash Can" Button .
  8. Then click "Delete property"
  9. Now your property is deleted but not account.
  10. Then select the account "ACCOUNT" , Then select "Trash Can"
  11. That's All. 






 

Wednesday, 24 February 2016

How to create Google Analytics code?

Here are the steps to create Google Analytics code for your website.








  1. First you need Gmail or Google account.
  2. Then go to the following link in your browser - https://www.google.com/analytics/
  3. Click Sign In button on right top corner
  4. Select Google Analytics 
  5. Give your gmail username and password and logged in.
  6. Then click sign up button on the top right corner.
  7. Give your information's like step5 Image.
  8. Scroll down and click Get Tracking Id button,
  9. Select country and I Accept button.
  10. Now you get your Tracking script  and ID  like step8 Image.
  11. You can put your Tracking id on blogger and Script on your website header.