Tuesday, 3 January 2017

Getting started with WordPress Calypso


If you’re not familiar with Calypso, you might want to start cozying up to the native desktop app sooner, rather than later. I made a small prediction that “WordPress” was going to make a more concentrated effort to push the native app experience on us over the next year, and based on Mullenweg’s 2016 State of the Word, it looks like it’s going to happen.
Using Calypso
One problem with web-based WordPress admin is, it’s slow.
Even with a fast internet connections and powerful web hosts, nothing will match the speed and fluidity of a native app. If you look at the apps you use on your iPhone, where you don’t even think about trying the mobile web version, the experience is effortless. Apps like banking, e-mail, social, and even blogging all run silky smooth. It’s that smooth experience Matt + Automattic + volunteers are going focus on.
Get it at apps.wordpress.com/desktop
Where to get Calypso
You can download Mac/Windows/Linux flavors of Calypso over on apps.WordPress.com. Links to the open source repositories on Github can also be found there, if you fancy yourself following along with the development of the apps. Side note: I really enjoy
Source: https://managewp.org/articles/14121/getting-started-with-wordpress-calypso




source https://williechiu40.wordpress.com/2017/01/03/getting-started-with-wordpress-calypso/

WordPress Listed As ‘CMS of the Year 2016’ for 7th Consecutive Year


W3Techs today released its list of ‘Web Technologies of the Year 2016,’ and once again, for the seventh consecutive year, WordPress earned the spot as the CMS of the year. WordPress is accompanied by other leading web technologies, like Google Analytics, Ubuntu, Amazon, and CloudFlare, on the list of web technologies of the year. The list is determined by the largest increase in usage in the last year, in which W3Techs “compared the number of sites using a technology on January 1st, 2016 with the corresponding number on January 1st, 2017.” WordPress has more than doubled since it first won CMS of the year in 2010, demonstrating its unstoppable growth and dynamic ability to power digital experiences as a full-service application.
At the start of 2016, WordPress was used by 25.6 percent of all websites and by the end was used by 27.3 percent — experiencing a 1.7 percent growth. For perspective, this is more than eight times the increase of the second place CMS, Shopify, which experienced a .2 percent increase over the year.
WordPress’s user-friendliness and extensibility make it the leading choice for small and enterprise sites alike. In fact, a whopping
Source: https://managewp.org/articles/14120/wordpress-listed-as-cms-of-the-year-2016-for-7th-consecutive-year




source https://williechiu40.wordpress.com/2017/01/03/wordpress-listed-as-cms-of-the-year-2016-for-7th-consecutive-year/

How to add Clicky analytics to the AMP site


In this article, I will show you how to add Clicky analytics to your AMP site. If you are reading further, I assume that you have some basic knowledge about WordPress functions, hooks and how they work, but I’ll explain to you which code does what.
As we have analytics code already in our AMP plugin, so now let’s remove existing code, before adding our own, as we don’t want two analytics code.
Paste this code at the end of your theme’s functions.php or create a new plugin to create a plugin read this detailed article on how we can create a plugin on top of AMP.
Remove existing AMP analytics
Below code will remove all the existing amp-analytics code.
add_action(‘init’,’ampforwp_remove_existing_analytics’);
function ampforwp_remove_existing_analytics() {
remove_action(‘amp_post_template_footer’,’ampforwp_analytics’,11);
}
Add Clicky analytics code
Please make sure you add your Clicky site id in “site_id”: “YOUR_SITE_ID_HERE” , you can find site id of your clicky account from here
function ampforwp_clicky_analytics() { ?>
<amp-analytics type="clicky">
<script type="application/json">
{
"vars":
Source: https://managewp.org/articles/14119/how-to-add-clicky-analytics-to-the-amp-site




source https://williechiu40.wordpress.com/2017/01/03/how-to-add-clicky-analytics-to-the-amp-site/

Writing Functional Tests for WP-CLI Packages


My last article was part of a short series on automating local WordPress site setup. In that series, we created a WP-CLI package that helps with installing and uninstalling WordPress development environments, and we even got it submitted to the WP-CLI Package Index. Since the command is available for anyone to use in the Package Index, it makes sense to improve on the command and make sure that it works for everyone. In this post we’re going to take a bit of a break from automating WordPress installs and start writing some functional tests to make sure that everything works as expected. While I’ll be writing the tests for the wp installer command, the same concepts should apply for any WP-CLI package.
Functional Tests? You mean Unit Tests?
You’ve probably heard of unit testing and tools like PHPUnit. Unit tests are a great way to test specific functions or methods in your projects, and focus more on the code side of things.
Functional tests are similar to unit tests, but differ in that instead of writing code to verify that your existing code works properly, you describe how you expect a specific feature to behave in human-readable terms. This can be done using a language
Source: https://managewp.org/articles/14118/writing-functional-tests-for-wp-cli-packages




source https://williechiu40.wordpress.com/2017/01/03/writing-functional-tests-for-wp-cli-packages/

Ultimate Conversion Tracking Guide for WordPress


We get asked this question all the time, and that is “How do I setup conversion tracking for my WordPress site?” When it comes to running a successful WordPress site, the first thing you need to ensure is that your site loads fast. The second is you should be tracking conversions for every action that occurs. From newsletter signups, to contact form submissions, and of course sales of products and or services. After all, if you don’t track conversions, how are you to know what is and isn’t working? You could be focusing your efforts on the entirely wrong marketing channel. Today we are going to share with you how to setup conversion tracking on your WordPress site, as well as the WooCommerce and Easy Digital Downloads e-commerce solutions.
Why is Conversion Tracking Is Important?
Conversion tracking, or the measurement of media performance, is essential for every type of website, from e-commerce sites to even affiliate marketing blogs. Without conversion tracking there is no way to make data-driven decisions. Below are some additional reasons and examples of why conversion tracking is important:
Instantly know what is working and what isn’t: Whether it
Source: https://managewp.org/articles/14117/ultimate-conversion-tracking-guide-for-wordpress




source https://williechiu40.wordpress.com/2017/01/03/ultimate-conversion-tracking-guide-for-wordpress/

How to use the static keyword with WordPress


This site has a lot of object-oriented programming articles. Most of them focus on solving WordPress problems using object-oriented programming. This is great when you’re comfortable with object-oriented programming. But most WordPress developers aren’t that comfortable with it. (You’d think there’d be a book on that or something.) It’s one thing to read about basic concepts like encapsulation and inheritance. It’s another to put them in practice. There are a lot of obstacles that you have to overcome.
One of these obstacles is the proper use of the static keyword. Static methods are a great object-oriented tool to use. But, like all good things, we can also abuse it if we’re not careful.
This happens a lot more in the WordPress development world than anywhere else. And there are good reasons for that. We’ll look at why that is and what you can do about it.
The static keyword is a something that you only use with object-oriented programming. You use it when declaring class methods and properties. This allows you to access them without needing to instantiate the class.
123456789101112131415161718192021
class A_WP_Class{/** * Actions that
Source: https://managewp.org/articles/14116/how-to-use-the-static-keyword-with-wordpress




source https://williechiu40.wordpress.com/2017/01/03/how-to-use-the-static-keyword-with-wordpress/

The Ultimate Guide to WooCommerce Shipping Zones – Igor Benić


WooCommerce Shipping Zones have been introduced in WooCommerce 2.6. This is a new feature and it enables you to change how much will you charge for certain shipping zones. In this tutorial we will learn how to configure them and use them in our code. This will be a large tutorial so be prepared to learn a lot! Also, as I like to do when doing something new, grab a cup of coffee, tea or any of your favourite development drink and let’s start:)
Don’t need a guide on using them? Jump straight to the code examples.
What are WooCommerce Shipping Zones?
This is a feature that has changed the Shipping screen and also how Shipping Methods function. Since the WooCommerce and the Automattic team care about their users, they have coded them to be backward compatible.
That means that if you are using any custom shipping method coded with the shipping method API, it should work without any errors. That is the good side. The bad side is a minor one, but it still is: you can’t use shipping zones with your custom shipping method.
Unless, the developer who made it, updates it with the new shipping method API.
How to use the Shipping Zones?
This is fairly easy. Open the Shipping settings
Source: https://managewp.org/articles/14115/the-ultimate-guide-to-woocommerce-shipping-zones-igor-beni




source https://williechiu40.wordpress.com/2017/01/03/the-ultimate-guide-to-woocommerce-shipping-zones-igor-benic/