Vijay Lathiya

Php Opensource Developer with writing articles on Php,HTML,CSS,jQuery, Google Map etc technologies area on blogger

Welcome to Vijay Lathiya Blog

I'm very thankfull for visiting my blog.

Wordpress Website development Surat

Google Map API Services

Google Map API V3 for get location with Lat-Long, Distance between two place and many more stuff you will get from my blog

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Tuesday, December 16, 2014

Find Infected Code in Nulled WP theme plugin


Are you Wordpress Developer ?
Good
Are you using nulled Wordpress Theme or Plugin ?
Very Sad

Because, As a Popularity and usage of Wordpress in Web Development field many many website available on Web that provides Premium Wordpress Themes and Plugin at free of cost. it called Nulled Wordpress Theme, Nulled Wordpress Plugin.

Main problem in use of these type nulled Theme and plugin is Security safety. you can not trust them. Because Except Wordpress Official repository all free listed nulled themes and plugins infected with malicious hack code that Harms your website as well as your Business.

 List of Possible harms of nulled free WordPress premium themes / Plugin
  • Access Blog as hidden Administrator or Completely hack
  • Redirect Blog to spam links and Google etc Search Engine not index / remove indexed Pages of blog
  • Display their Ads on Blog
  • Get backlink from your blog to unknowingly site
  • Theme / Plugin Company may take legal action
  • Hosting Company suspend Account
  • Security issue on other hosted same server sites
Now Onward stop to use Nulled Theme and Plugin and also download / Purchase it only from Trusted repository.
Check your Running Wordpress site and make sure it does not infected by any harmful Malicious hacking code.

Check for Malicious codes

After downloading the theme and plugin, The first step you must need to take is to check downloaded themes, Plugin file not infected by virus.

Check for Virus

Go to VirusTotal.com and check by uploading the zip file. If your file is infected than you will get a red signal with list or detected Malicious script and if not then you can move on to next step.

Check unwanted codes in Wordpress blog

Using Exploit Scanner Wordpress free plugin you can check for unwanted codes exist or not in your install wordpress and used other plugins file.

Check encrypted links codes in Wordpress

One another Wordpress free plugin Theme Authenticity Checker (TAC) also very helpful for you in the process of Check installed Theme, plugins not infected by unwanted Malicious code. Theme Authenticity Checker (TAC) Wordpress plugin give you a warning if any encrypted links are found in a theme with with their authenticity result.

Saturday, December 13, 2014

Remove Query String From CSS & Javascript In WP

To see your website Top in Google search result it is required that your site well developed and according to google standard. Site loading time is the most important factor to get good position in Google and other search engine result.

Today, Gtmetrix, Pingdom, Google page speed insight tool etc Many online tools available on web to check site designed or not according to SEO standard.

According to Pingdom & Gtmetrix tool suggestion removing query strings from static resources like css style sheet and java-script url is the higher priority which is considered during the speed test of website which contain query sting in css and javascript file.

Why used query string in CSS JS Url?

Query string with version in url is a method followed by Developer to instantly render new updates and carry the different plugins version details with file. Normally Query string are used for both java-script and style-sheets file calling url.

Why need to remove query string From CSS JS url

As per Pingdom tools suggestion " Resources with a "?" in the URL are not cached by some proxy caching servers. Remove the query string and encode the parameters into the URL for the following resources:"
Some Proxy server not cache the url which has Query string hence to get good speed performance for website it better to store static CSS, Js files store in Browser cache and render quickly on user second visit.

Remove query string from static resources in Wordpress

There are 2 easy method in Wordpress to remove Query String from Static CSS, Javascript file.

# 1 Add Few line code in Wordpress theme function.php file

Very basic Programming Skill required to add following code in current theme function.php file. You can either choose to edit your theme via wordpress dashboard or use ftp software or online file manager from your hosting cpanel.
// Remove query string from static files 
function remove_css_js_ver( $src ) { if( strpos( $src, '?ver' ) ) { $rqs = explode( '?ver', $src ); return $rqs[0]; } if( strpos( $src, '?rev' ) ) { $rqs = explode( '?rev', $src ); return $rqs[0]; } return $src; } add_filter( 'style_loader_src', 'remove_css_js_ver', 15, 2 ); add_filter( 'script_loader_src', 'remove_css_js_ver', 15, 2 );

# 2 Use WP Plugin Remove query strings from static Resources

It is very easiest way to deal with Query sting in Wordpress. no need to edit any file or no need back up of Live Database just add and activate remove query strings from static resources plugin.

Still If you have any query or facing problem kindly share in comment.
ion

Saturday, December 6, 2014

301 Redirect Importance in SEO

Are you planing to move your already running website to new platform or in seo friendly url structure that is preferred by  Google SEO team ?

Well, Its good step to run your website with new latest web technologies as well as according to  suggestion of Google search result team.
Im sharing here one important tips that help you keep your traffic without any drop as well as by redirect user and search engine robots crawler to new site url once you migrate old site to new domain or mould in new structure. in such cases its very helpful for good SEO to use 301 Redirection technique and redirect old site indexed pages to relevant new Url.
301 Redirect  mean permanently redirection. it redirect search engine crawler, visitor to new redirection url.


Methods of 301 Redirection

1  301 redirect using javascript

2  PHP for Linux / Unix / Apache put this at the very top of the page

Using Php Script
<?php
header( "HTTP/1.1 301 Moved Permanently" );
header( "Location: http://www.domain.com/new-page-url.html" ); ?>

Using .Htaccess rule
RewriteCond %{HTTP_HOST} ^domain.com$
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]   #add WWW prefix


3 ASP for Windows Servers

<%@ Language=VBScript %> <% ' Permanent redirection Response.Status = "301 Moved Permanently" Response.AddHeader "Location", "http://www.mysite.com/new-page.html/" Response.End %>

4 HTML Page Redirect

<meta http-equiv="refresh" content="0;url=http://www.mysite.com/new-page.html">

Google Search engine team also recommend that use a server-side 301 redirect.

301 redirects are useful in the following circumstances.
- Move site to new domain
- Change url structure of existing site 
- Static website migrate to dynamic platform
- Canonical URL
Access site main/home page with one url if either user hit 
http://www.domain.com
http://domain.com
http://www.domain.com/index.php
http://www.domain.com/home.php
http://www.domain.com/index.html etc etc than redirect user to any one preferred url by 301 redirect

301 Redirect all possible url to one specific url using .htaccess
# Redirect index.php to main domain url
RewriteCond %{THE_REQUEST} ^.*/index.php

RewriteRule ^(.*)index.php$ http://www.domain.com/$1 [QSA]



For IP Canonicalization – Url Canonicalization Solution by htaccess and Web.config visit

More Info  Google Webmaster Support

Sunday, November 16, 2014

Import Outlook Email to Gmail

Import Email from Outlook / Hotmail to Gmail


Yesterday I have call from my friend as he need my help to import all emails from his recently used Outlook.com account mail to his newly created Gmail account. After searching on Internet I see that on internet there are a number of articles for how to import your email from Gmail Account to Outlook, but no any clear instructions for importing the outlook (hotmail) mail to Gmail.
After checking Gmail account setting I found that it’s very easy to migrate mail from Outloook to Gmail.
Follow below simple step and relax by import your all existing mail to Gmail Account
  • 1. Log into your new Gmail account and click the gear icon and choose the Settings.
  • 2. In the Settings tabs, click on 4th tab "Accounts and Import"
  • 3. In Next step look at Check mail from other accounts (using POP3), click "Add a POP3 mail account you own"
  • 4. Put an email address in the Email Address Textbox to get email from that account and press next step button.
  • 5. Add your Outlook.com mail account username and password.
  • 6. Check – uncheck other option if you want to leave a copy of retrieved message on the Outlook account.
  • 7. If you getting connection error, you need to enable POP connection on Outlook.com. to activate Go to your Outlook.com settings, click on "Connect devices and apps with POP" and make it enable Pop.

Sunday, August 31, 2014

Generate Thumb in WP

In Wordpress its very easy to generate any size thumb of uploaded image using wp add_theme_support function.

WP add_theme_support() function create a thumb copy of the uploaded image with the specified dimensions when a new image is uploaded from the media gallery.

<?php add_image_size( $thumb-type-name, $width, $height, $crop); ?>


Note: To enable featured images with add_image_size function  in current theme it must include add_theme_support( 'post-thumbnails' ); in itsfunctions.php file. 

Parameters :
$thumb-type-name (string) (required)
- The new image size name.
Default: None

$width (int) (optional)
- The post thumbnail width in pixels.
Default: 0

$height (int) (optional)
- The post thumbnail height in pixels.
Default: 0

$crop (boolean/array) (optional) see Hard crop vs Soft crop
- crop images to specified height and width or resize based on soft and hard crop
  • false - Soft proportional crop mode.
  • true - Hard crop mode.
  • array - Specify positioning of the crop area (x_crop_position, y_crop_position).

Saturday, August 30, 2014

WP hard crop vs soft crop


In Wordpress, During work with Media Gallery Image upload i see that my uploaded image hard cropped to a specif size thumnail with some part of the image is chopped off.

so i tried to find out reason and setting provided by Wordpress framework. within few moment search i find out that in Wordpress there is setting for "Crop thumbnail to exact dimensions" with checkbox inside WordPress Dashboard > Media > Thumbnail size

With “Crop thumbnail to exact dimensions” option check and uncheck  we getting different types uploaded images thumbnail.



See Generate Custom size thumb in Wordpress

Example  : Im using following Wordpress logo image with orizinal size width 473 px and height  348 px



Checkbox checked - Hard Crop Image

The uploaded image is cropped to a thumbnail of 150 x 150 Px. here we can see that how some part of the image is chopped off so that it can fit it into the hard set 150px x 150px size.



Checkbox un-checked - Soft Crop Image
with soft crop case thumb of image should be generated with  either given width or height width (Contstrain Proportions) and corresponding width or height without chopped images.

Below thumbnail generated with 150px width and 110px height in soft cropped case.


while we install wordpress than by default checkbox checked so all thumbnail images will be hard cropped by default and all uploaded images  chopped off as .

WordPress by default checks this checkbox for you when installed so all your thumbnail images will be hard cropped by default. I personally don’t think that’s a good idea and always turn the checkbox off so my resized thumbnails still sees the full picture, instead of a cropped/chopped off thumbnail image.

if you want your uploaded images all thumbnail generated with the full picture instead of a cropped/chopped original image than i suggest keep unchecked (off) option "Crop thumbnail to exact dimensions" checkbox that is inside WordPress Dashboard > Media > Thumbnail size

References  : davidtan.org

Monday, August 25, 2014

Paypal customer return to Site

- Like our functionality for E-commerce Online Shopping site, mostly all require to get back thier customer on the website with Payment responce status to update on website after  payment done on Paypal

Follow below step & Image snap to Return back Customers to Website after payment done using Paypal

1 Log in and click the Profile subtab under My Account.
2 Click the My Selling Tools
3 Website Payment Preferences
4 Click the On radio button to enable Auto Return.  Enter the Return URL. Note: You must meet the Return URL requirements in order to set up Auto Return. Learn more about Return URL.
5 Click the On radio button to Payment Datat Transfer



 Source : Paypal