Insights

Useful notes for better technical decisions.

Practical articles for business owners deciding what to build, improve, or maintain next.

How to use beaver builder templates for custom Post Types without Beaver Themer

So you purchased the beaver builder page builder and you are happy with it building all kinds of things, But you have a template that you want a certain Post type to use without purchasing the beaver themer addon, Here’s how to do it. Each template in beaver builder has an ‘id’, you can get that id by going into the template in the dashboard and looking at the URL, it will be something like that https://www.website.com/wp-admin/post.php?post=3681&action=edit That’s our id here ‘3681’, So what are we going to do with that ID? Beaver builder has a great shortcode we can use to display any template by it’s id here it So now you can put inside your single post type page or you can do it from fuctions.php like that Here I’m only displaying that template for post author with ID 20 and for post type Jobs, So you can do many things here with that great shortcode without purchasing the addon.

Read article

Paypal & Stripe Currency Converter for WordPress with WooCommerce & WPML

Do you want to show your WooCommerce store with a currency that’s not supported by Paypal and Stripe and also use them as payment gateways ? And show your default currency on all the website except on the user goes to the checkout page ? We will do that using the WPML & WooCommerce, here’s the plugins you will need to be installed to achieve that 1- Add the new currency that you want customers to pay with and also set the exchange rate with the default currency, don’t worry you don’t have to show it in the frontend for the users 2- We need to enable PayPal gateway in the website as it won’t be enabled because our default currency is not supported so add this snippet to solve this issue. Change ‘AED’ with your default currency code. 3- Now we will have to show the default currency in the whole website except the checkout page, and we can do that with this snippet Change ‘USD’ to your new currency Change ‘AED’ to your default currency Now the issue is solved and all visitors and customers can now pay with PayPal and Stripe in your non supported currency store.

Read article

Login with Phone number in Woocommerce WordPress

We will learn today how can we enable our customers to login with their phone number or any other custom field of our choice. 1- Add phone number field in the woocommerce registration form 2- Save the phone number field in the database when the user registers into the website 3- Now we need to edit the WordPress authentication process so we can tell it to login the user with his phone number or any custom field Make a function to search for users by phone number Then we check if the email and username doesn’t exist in the authentication process, that’s how we know the user might have written his phone number, so we search for him by his phone number and return the user. 4- Finally we need to edit the login label to tell the user that he can login with his phone number Full Gist of the code are here

Read article