How to users login into WordPress using their email address / username

Sometimes users do not remember their username they choses when they signing up for your WordPress website/blog. Wordpress provide you an option to login by using username. However, they’re less likely to forget their own email address.

To find your desire username on any platform is not possible. Mostly website gives an option to retrieve your username along with forgot password option. Using your email address as username is a good practice because you have your desire email address. So you can remember that easily and give option to login into wordpress using email address or username. Sometimes users do not remember their username they choses when they signing up for your WordPress website/blog. WordPress provide you an option to login by using username. However, they’re less likely to forget their own email address. A question raise How to login into WordPress using their email address / username ? You can give users the option to login using either method by adding this code snippet into your theme’s functions.php file.

function sf_email_login_authenticate( $user, $username, $password ) { if ( is_a( $user, 'WP_User' ) ) return $user; if ( !empty( $username ) ) { $username = str_replace( '&', '&', stripslashes( $username ) ); $user = get_user_by( 'email', $username ); if ( isset( $user, $user->user_login, $user->user_status ) && 0 == (int) $user->user_status ) $username = $user->user_login; } return wp_authenticate_username_password( null, $username, $password ); } remove_filter( 'authenticate', 'wp_authenticate_username_password',
 20, 3 ); add_filter( 'authenticate', 'sf_email_login_authenticate', 20, 3 );

WordPress enabled XML-RPC by default in version 3.5

In WordPress the XML-RPC service was by default disabled for a long time, the reason was it considered a security hole (e.g. comment and trackback spam). Now in wordpress 3.5 these setting are changed

“Quite a bit has changed since we introduced off-by-default for XML-RPC. Their code has improved, and it is no longer considered a second-class citizen when it comes to API development, thanks to the work of a large team of awesome contributors. Security is no greater a concern than the rest of core.
There is no longer a compelling reason to disable this by default. It’s time we should remove the option entirely.”

(Andrew Nacin, Ticket #21509)

If you’re updating your installation to v3.5 the option enable_xmlrpc will be removed from the database meaning that the service will be enabled even if you had disabled it in the settings. The (now marked as deprecated) filters pre_option_enable_xmlrpc and option_enable_xmlrpc will still be respected.

Nevertheless it’s still possible to disable the service though it’s a bit more difficult. WordPress v3.5 introduces the filter xmlrpc_enabled:

add_filter('xmlrpc_enabled', '__return_false');

You can add this code to your wp_config.php after the line require_once(ABSPATH . ‘wp-settings.php’); if you want to disable XML-RPC for your site. Surely a better solution is to create a small plugin.

WordPress also contained the lesser known “Atom publishing” protocol. This service will be removed in version 3.5 since it has much less functions than the XML-RPC implementation and has (according to Nacin) “never received much love from developers” (#21866). Any attempt to call the AtomPub service will be answered with a 403 error. Plugins that are extending the class wp_atom_server will receive a warning that the class is deprecated.
If you still want to use the AtomPub protocol you can install a plugin.
Sourece: wpengineer

Full Page Scrolling Navigation using Ascensor.js

Ascensor is a jQuery plugin that creates a full screen scrollable navigation area ideally for Personal portfolio website or brands websites.

Ascensor is a jQuery plugin that creates a full screen scrollable navigation area ideally for Personal portfolio website or brands websites. There are many features included in in Ascensor, Pages can be navigated by clicking previous & next buttons and also by clicking in the navigation area which is a customizable series of blocks or links that represent a map of the pages. You can create your own choice navigation e.g. circle, zigzag square etc. Ascensor is depended on the jQuery and ScrollTo plugin to scroll between pages smoothly.   Let’s we create 5 pages personal portfolio, to achieve this you need to do some operations which are listed below.

Operation

Ascensor needs the jQuery library and the great plugin scrollTo. You have to download the plugin here or his minified version here

     

 

Operation HTML

You need to think like an architect. You must build a house with 5 floors. For this you must do so:

Operation JS

In your script file you simply need to write:

 $('# portfolio).ascensor(); 

Operation JS 2

There are several settings for this plugin.

 $('#house').ascensor({ AscensorName:'portfolio', //you can choose the name that will define id and class (default:'maison') WindowsFocus:true, //if you start on the first content(default:true) WindowsOn:'0', //if you can to start to the 0,1,2,3 etc.. content Direction:'y', //What will be the direction of the ascensor NavigationDirection:'xy', //what will be   his navigation direction(par défaut:'xy') });

 

Operation JS 3

There are also settings that allow the creation of navigation, disabling certain keys or even send the code to add elements.

 $('#content').ascensor({ Navig:true, //if you need a navigation system Link:true, //If you need a link per page for the next page PrevNext:true, //if you need a prev/next button KeyArrow:false, //deactivate the arrow key keySwitch:false, //deactivate    navigation by arrow key CSSstyles:true, //if you need the Default CSS plugin ReturnURL:true, //if you need a url per page ReturnCode:true, //Give you id and class of the navig/link/content }); 

Operation JS 4

There are more complicated settings for this plugin. They can create a system map that defines the scale (AscensorMap) in which we will place each element by a series of coordinates (ContentCoord).  

 $('#content').ascensor({ ChocolateAscensor:true, //if you need to place yourself all the stage AscensorMap: '4|3', //define the size of a map ContentCoord:'1|1 & 2|2 & 1|2 & 3|4 & 1|3 & 3|1 & 2|3' //place stage one by one, indicating they positionx|positiony }); 

 

Operation CSS

Then, Hide scrollbar in css

 body{overflow: hidden;} 

You have done it test you website. Cheer up! If you enjoyed this article, please consider sharing it!

Beautiful, corporate and clean looking free responsive WordPress themes

So far in 1012 we have seen Mobile usage and internet usage on Mobile grown up. As mobile traffic continues to grow and websites owners are under pressure to make sure their website are optimized and functional on all kind of devices and browsers.

So far in 1012 we have seen Mobile usage and internet usage on Mobile grown up. As mobile traffic continues to grow and websites owners are under pressure to make sure their website are optimized and functional on all kind of devices and browsers. We have seen bang of responsive websites and open source framework themes.

Installing a responsive WordPress theme on your website is the easiest way to make you website looks good on cross browsers and across mobile devices. Here is the list of some beautiful, corporate and clean looking free responsive WordPress themes to help you to get started to compete the world.

Optimize CSS/jQuery Code With RequireJS

RequireJS is a JavaScript file and module loader. It is optimized for in-browser use, but it can be used in other JavaScript environments, like Rhino andNode. Using a modular script loader like RequireJS will improve the speed and quality of your code.

When a project reaches a certain size, managing the script modules for a project starts to get tricky. You need to be sure to sequence the scripts in the right order, and you need to start seriously thinking about combining scripts together into a bundle for deployment, so that only one or a very small number of requests are made to load the scripts. RequireJS is a JavaScript file and module loader. It is optimized for in-browser use, but it can be used in other JavaScript environments, like Rhino andNode. Using a modular script loader like RequireJS will improve the speed and quality of your code.
IE 6+ ………. compatible
✔ Firefox 2+ ….. compatible
✔ Safari 3.2+ …. compatible
Get started then check out the API.

Change the “posts” label to “articles” in WordPress admin

Most of clients are not too good with technology and internet terminologies. Even many clients know about wordpress and used it but some it confuse clients. For example most of clients find the term “Post” and get confused.

Most of clients are not too good with technology and internet terminologies. Even many clients know about wordpress and used it but some it confuse clients. For example most of clients find the term “Post” and get confused.

While term “Article” is much self-explanatory. So let’s change the term “Posts” label to “Articles” Nothing is complicated to do this. Just open the function.php in your selected theme and past the code bellow in file and save it, you’re done! Enjoy;

 
/******** Code to change the "Post" Lablel to "Article" *************/ 
add_filter('gettext', 'change_post_to_article'); 
add_filter('ngettext', 'change_post_to_article'); 
function change_post_to_article($translated) {
	$translated   = str_ireplace('Post', 'Article', $translated); 
	return $translated; 
	}
	

Thanks to Smashing Magazine for the cool tip!

If you enjoyed this article, please consider sharing it!

Initializr: Templates with great “responsivities”

The customized template (responsible) is now available in Initializr your website to display various tools used to help cope with. Phones, tablets (pills), netbooks, notebooks (laptops), monitors, desktop computers (desktop) and desktop monitor companies.

The customized template (responsible) is now available in Initializr your website to display various tools used to help cope with. Phones, tablets (pills), netbooks, notebooks (laptops), monitors, desktop computers (desktop) and desktop monitor companies. All these tools to your website to display properly is a nightmare. Well, I think, a bad dream … Absolutely not! Adaptable to your web site, but at least Boilerplate code, are here to make your life easier. Let’s see how it works and the best practices presented in this new template.

A little reminder about web design adaptable

Those last few months (people who have no life and spends his days reading blogs and tweets as read) for living in a cave, you might be a little bit about web design adaptable means update is needed. Concept, introduced by Ethan Marcotte is simple: web site design elements, depending on the size of the screen to be customized so that it always is easy and convenient for the user to read. Which would be more appropriate for a desktop – for example a mobile phone to a vertical view, minimalist 2 or 3 columns for a column is easy. What do you think about the pills? We may also screen designed to fit the average size can adopt? Because your display device the size of our customers can not find a method that still works well to find it anywhere. (Book recommendation: Accept Web Design by Ethan Marcotte)

Adaptable to design a site, and forget the normal 960px widths available static liquid material widths and half percent of the questions (this issue will be discussed below) to begin working with the meeting.

Widths based on percent composition of a liquid (or liquid)

The first thing you need to design our “liquid” is for. This is known as liquid design that fits the size of the container body as the ratio is maintained when the resolution changes (when the screen changes, because of either a user or device reset, do not change) . We work to establish a code, or broad, horizontal recruitment or may not have horizontal margin. So basically we can use percentage:

#this-is-a-fluid-container{ 
width:50%; padding: 20px 10%; margin:0 10%; 
}

If you strictly follow this procedure, you created a desktop monitor to a large cell with a small screen will go off without a hitch. It is very interesting, but we are still the same for each device design, which is far from ideal! But do not worry, now half of the questions, the problem comes with the fun part.

About half of the first mobile device strategy

Questions depend on defined media device used in different styles (or knowledge of specific screen resolutions, pointing, for example) is a very good way. If equipment is to start with lower resolution and is moving towards larger screens. The words “mobile” This simplistic view of adaptable workforce is mobile. About half of the questions I still have not taken account. You can see that one side (orange blocks) were located in the lower part of this site.
Remember the one hand, the only element left or right of any other element does not need to be defined. Semantic content of the element of this definition is that the content is important, therefore, it is not an issue under articles. The words “intermediate” This site is a great tool (such as a tablet or smartphone as a horizontal or landscape orientation is also known as) is seen, the vertical menu buttons being disturbed and ugly too limited be. If we question the use of half horizontally to display 480px wide as some, as you can to appear larger:

@media only screen and (min-width: 480px) { 
nav a{ float:left; width:27%; 
margin:0 1.7%; padding:25px 2%; 
margin-bottom:0; } 
}

The result is the following:  

The words “broad”

We are now shooting for a simple menu. But what if we open the page in a notebook? If it’s big screens, a vertical column are not the best fit for these devices can. It is better to be a two column layout, so we keep the important stuff on the side of the page for the menu to move to one side as you can. If more than 768px wide resolutions for the second half of the question:

@media only screen and (min-width: 768px) { 
#title{ float:left; } 
nav{ float:right; width:38%; } 
#main article{ float:left; width:57%; } 
#main aside{ float:right; width:38%; } 
}

This is what we see on screen is 900px wide about:

Now that we have a two column layout with a “desktop view” conforms to the “now you see that it was difficult to start a mobile version! I do not already bdyhy can, but you are using a very sharp, and definitely get a lot cleaner code. This approach can be found a new shade. CSS3 effects like shadows, CPU or CPUs with lower total ash is not suitable for mobile devices. In contrast, the latter may order a laptop or a desktop device will appear as a more powerful, because we have enough to handle these effects can be expected. “Maximum width” sight Last but not least. Widescreen display for improved we need our web site.We avoid this in widescreen for a wide range of needs. 960px, 1140px, 2000px, whatever, just for your site that is most sensitive to this point anything can happen. For that matter, in the limit of 1140px, 1280px wide screens, which, the most common resolution is chosen as fits. If we work with a fixed width and automatic sheet margin (the default style as much as the material wraps around is called) is full of great use.

@media only screen and (min-width: 1140px) { 
.wrapper{ width:1026px;
 /* 1140px - 10% for margins */ 
 margin:0 auto; } 
 }

I 1026px (1140px -% 10) outside the margin of the sheet width setting in the past was thereby adjusted to 10 percent. Therefore, it readjusted the size of the browser content will change and will install easily. This configuration can achieve far more extensive than we have: All these questions and had a half! SourceDownload Article Source http://www.diegoante.com/initializr-responsive.html

Add Next/Previous Products links in Magento

If you are looking to add Next product and Previous products link to your current product. Development logic is very simple there… just like One ..Two…Threee and you have don it.
1. Fetch current product id
2.Take the one before
3. After that one
Now you have previous and next products. Remember that this will work per category only, since you will get list of products in current category.

So how will next code work?
You have to dump this line of code at top in your catalog/product/view.phtml in your theme:

Mage::registry('current_category')->getProductsPosition();

By using the above line of code will get an array with keys of product id’s and product positions as values of that current category.

Now dump this code after above line of code.

function getPreviousProduct_Syntax()
    {
        $_prodId = Mage::registry('current_product')->getId();
 
        $catArray = Mage::registry('current_category');
 
        if($catArray){
            $catArray = $catArray->getProductsPosition();
            $keys = array_flip(array_keys($catArray));
            $values = array_keys($catArray);
            $productId = $values[$keys[$_prodId]-1];
            $product = Mage::getModel('catalog/product');
            if($productId){
                $product->load($productId);
                return $product->getProductUrl();
            }
            return false;
        }
        return false;
    }
 
function getNextProduct_Syntax()
    {
        $_prodId = Mage::registry('current_product')->getId();
        $catArray = Mage::registry('current_category');
        if($catArray){
            $catArray = $catArray->getProductsPosition();
            $keys = array_flip(array_keys($catArray));
            $values = array_keys($catArray);
             $productId = $values[$keys[$_prodId]+1];
             $product = Mage::getModel('catalog/product');
             if($productId){
                $product->load($productId);
                return $product->getProductUrl();
            }
            return false;
        }
         return false;
    }

 $_prevLink = getPreviousProduct_Syntax();  
 $_nextLink = getNextProduct_Syntax(); 

Dump this code where you want to display Next / Previous Products links.



__('< Previous')?>




__('Next >')?>

This may not work in lyated navigation 🙁 .