Adding users to the sudoers requires the usage of vi, which can be fairly confusing if you’re not accustomed to it. For the unfamiliar, we’ll outline the exact key command sequences to edit, insert, and save the file in vi, follow the instructions carefully. Launch Terminal and type the following command: sudo visudo Use the… Continue Reading
How to remove all the histories from repository
To make a git repository fresh like new, follow the steps below: Checkout git checkout –orphan latest_branch Add all the files git add -A Commit the changes git commit -am “commit message” Delete the branch git branch -D master Rename the current branch to master git branch -m master Finally, force update your repository git… Continue Reading
Set fields default value for visual composer
I am developing a WordPress theme which will be run via WPBakery visual composer and I had to set a default value for some of the fields. I was looking on the web if there any solution to set the default value but I could not find any so I start looking the plugin and… Continue Reading
Badge OS User data manipulation programmatically
There are a couple different ways you can interact with the user-related data created by BadgeOS. The first and most obvious is to use the provided helper functions, but if you choose you can also interact with the data directly using the user meta keys referenced below. Functions: badgeos_get_user_achievements() Usage: $args = array( ‘user_id’ =>… Continue Reading
How to make a bootable macOS Sierra USB drive
To make a bootable macOS Sierra USB drive please follow the steps below. Assuming you have already downloaded the OS from app store. Here is what you need to do: Connect the USB drive to your Mac. Using Disk Utility (it is typically found in the Other folder, under Launchpad), format the USB drive as… Continue Reading
Contact form 7 – Javascript API
Contact Form 7 emits a number of Javascript events that bubble up to the document object. In version 4.1 they can be found in contact-form-7/includes/js/scripts.js. If you’re using jQuery you can access those events like this: $(document).on(‘spam.wpcf7’, function () { console.log(‘submit.wpcf7 was triggered!’); }); $(document).on(‘invalid.wpcf7’, function () { console.log(‘invalid.wpcf7 was triggered!’); }); $(document).on(‘mailsent.wpcf7’, function ()… Continue Reading
Sync AMPPS with multiple machines
Here is a roadmap to establish AMPPS with Dropbox: Download and install the latest version of AMPPS. In the Programs folder will include the folder “var” and “www” are created. In the database files already come “var” folder and “www”, all individual files of your website. Create a folder under your Dropbox account “AMPPS” on… Continue Reading
WooCommerce add to cart button link change to product page
Use the below code to accomplish what ever you want. add_filter( ‘woocommerce_loop_add_to_cart_link’, ‘epik_add_product_link’ ); function epik_add_product_link( $link ) { global $product; $link = ‘ SHOP NOW’; return $link; }… Continue Reading
Reset “Use Secure in Front End or Admin” in Database – Magento
I ran into an issue this week where I switched on SSL on a development site and then realized the SSL cert was not installed correctly. This is a big issue in Magento because there is no way to get back to the admin to switch it back off. If this ever happens do the… Continue Reading
Magento Fishpig Get different image size
To get different size of images from wordpress to magento blog use those available image functions getThumbnailImage() getMediumImage() getLargeImage() getFullSizeImage() getPostThumbnailImage() getAvailableImage() getImageByType($type = ‘thumbnail’)… Continue Reading