However, you can use the hook to apply whatever you want. There are several occasions where you want to do something, when an order is complete.
The use case is this. You want to add the new user/customer to a specific group, after buying a specific product. The steps below explain the logic of the snippet following. [Read more…] about Add user to group after product purchase in WP
Today i will show you how to import Gmail Contacts to iPhone 5 running iOS 8. It might sound easy but it isn’t, see below.
After losing my Android handset, it was time to use an iPhone 5 i had sitting in my drawer. Everything is fine, it is a brilliant handset despite the battery’s short life, but somehow i had to import my Gmail Contacts.
All my contacts are in my Gmail account and for a strange reason i was expecting this to be tricky. Unlike Androids where you can import Contacts through a file, iPhone doesn’t even have an option for such an import. In addition, there was nothing indicating how to do this task in the phone menu. So for a total iPhone-newbie like me this wasn’t easy, or at least not the obvious.
Setting up a Google Account
Today i will show you how to set sticky posts automatically. You can do it manually of course under Post > Edit by ticking the option under Visibility Option. However, we usually set sticky posts and forget them. Especially, when it comes to a blog with several posts there can be a lot of sticky posts forgotten out there without a purpose.
I have previously written a post on how to auto-manipulate sticky posts here. There you could make sticky posts disappear from the home page, or you could put the sticky post in its chronological order. [Read more…] about Set Sticky Posts Automatically For New Posts – How To
Today i will show how you can use your custom WordPress query by simply using the hook pre_get_posts. This is an interesting hook that can modify the query before execution. As a result you can alter the WordPress query results aka the posts that come up to your blog.
There are several options to do this. Whether you want to limit the number of posts shown per page for example, or to include/exclude specific categories. You can also exclude or even order sticky posts chronologically.
All these gave me some interesting ideas on how to modify the WordPress query and experiment with the homepage. [Read more…] about Custom WordPress Query With pre_get_posts
After setting your new WordPress site, i believe you should definitely change the default WP logo in the wp-login page and use your custom logo instead. So in this post i will show you how you can change it using a simple hook.
Of course you can add your custom css and change the default WP logo but there is also this nice hook which alters the background image via css and can be put in your Child Theme’s function.php file.
Whether you decide to change the stylesheet or add the hook below to use your custom logo, you should use a Child Theme. The Child Theme is useful not only for this hook but also for every single one modification you want to add to your theme. The reason for that is pretty simple. When you use a Child Theme to change stuff etc all these modifications remain intact when you update your parent theme. [Read more…] about Custom Logo in wp-login Page