Category Archives: EnvatoTutsCode

How to Embed a Video Player in Your WordPress Site With a Free Plugin

In this post, we’ll use the Easy Video Player plugin which allows you to embed videos on your WordPress site. I’ll demonstrate how you can use this plugin on your own site to embed videos.

Embedding videos on your website is essential nowadays, no mater what domain you’re associated with. Videos are one of the best ways to convey your ideas to your customers! In particular, if you’re building a WordPress website which requires video streaming capabilities, you’re at the right place! As a site owner, you need an easy-to-use and lightweight video player plugin which does the job for you.

read more

Creating eCommerce Apps With the MStore Pro React Native Template

Using React Native is one of the fastest ways to develop a cross-platform mobile app today. Apps you create with it look good on both Android and iOS, and usually deliver near-native performance. Creating a successful eCommerce app with it, however, would still require substantial amounts of skill and effort, especially if you’re starting from scratch.

Fortunately, React Native supports custom templates. A well-designed custom template can boost your productivity and dramatically reduce your time to market. CodeCanyon has plenty of premium React Native templates aimed at eCommerce app developers. Among them, MStore Pro stands out as one of the most mature, reusable, and comprehensive.

Right out of the box, MStore Pro supports WooCommerce integration, AdMob and Facebook ads, push notifications, and multiple payment gateways. Additionally, it comes with a large collection of modular components and over 30 beautiful layouts.

In this tutorial, I’ll show you how to install MStore Pro and make the most of its primary features.

Prerequisites

To follow along, you’ll need:

  • the latest version of NodeJS
  • the latest version of Android Studio
  • a device or emulator running Android 5.0 or higher
  • a WordPress instance with the WooCommerce plugin installed
  • an Envato account

To better understand why using React Native templates is a good idea, I suggest you also read the following article:

React Native 5 React Native UI Kits, Themes, and App Templates Kyle Sloka-Frey

1. Download the Template

MStore Pro, developed by Envato elite author InspireUI, is one of the most popular React Native templates currently available on CodeCanyon.

MStore Pro page on CodeCanyon

To download it, log in to your Envato account and purchase a regular license for it. Once you do so, you’ll have access to a ZIP file named codecanyon-17010642-beostore-complete-react-native-template-for-ecommerce.zip.

Download the file to your computer and extract it to a temporary directory using an archive manager. If you prefer using a terminal, you can run the following commands:

cd /tmp
unzip ~/Downloads/codecanyon-17010642-beostore-\
complete-react-native-template-for-ecommerce.zip

MStore Pro can be used with both Expo and React Native CLI. For now, we’ll be using it with the latter. So we need only the mstore-3.8.0/mstore-pro directory. Copy it to your development environment and enter it.

cp -r mstore-3.8.0/mstore-pro ~/dev
cd ~/dev/mstore-pro

Like most React Native templates, this template too has both an Android project and an Xcode project inside it. In this tutorial, we’ll be working only with the Android project.

The Android project needs to know the location of your Android SDK. So open the android/local.properties file and update the value of the sdk.dir property.

sdk.dir=/home/me/Android/Sdk

2. Install Dependencies

You’ll, of course, need React Native CLI to build the project you prepared in the previous step. If you don’t have it already, here’s how you can install it using npm:

npm install -g react-native-cli

To manage MStore Pro’s dependencies, you’re going to need yarn. Use npm again to install it.

npm install -g yarn

You can now use yarn to download and install all the dependencies.

yarn install

The above command may take a while, depending on how fast your Internet connection is. Once it’s complete, do remember to link all the native dependencies by running the following command:

react-native link

At this point, MStore Pro is ready to be used.

3. Build and Run

To install MStore Pro on your Android device, all you need to do is run this command:

react-native run-android

If your Android development environment has no configuration issues, after a successful build, you should be able to see MStore Pro’s splash screen and intro screens on your device.

Splash and intro screens of MStore Pro

4. Configure WordPress

MStore Pro is meant to be used with WordPress and WooCommerce. To allow it to communicate with your WordPress instance, you’ll have to install a few WordPress plugins. All the necessary plugins are free and open source, and are available on the MStore GitHub repository, which is maintained by InspireUI.

Visit the repository, select Clone or download, and press the Download ZIP button to download the entire repository as a ZIP file. Alternatively, you can run the following command from your WordPress server:

wget 'https://github.com/inspireui/mstore/archive/master.zip'

Extract the ZIP file and copy all the contents of the plugins directory to your WordPress instance’s wp-content/plugins directory.

You must now activate all the newly installed plugins. To do so, log in to your WordPress admin dashboard and navigate to Plugins > Installed Plugins. Then click on the Activate links shown below the following plugins:

  • JSON API – InspireUI
  • JSON API Auth
  • MStore CheckOut Plugin and API
  • Regenerate Thumbnails
  • Better REST API Featured Images
List of new plugins waiting to be activated

Additionally, navigate to Settings > JSON API and click on the Activate link shown below the MStoreUser controller.

List of controllers

In addition to your store’s products, the template can display blog posts too, so long as they have pretty permalinks. So if you’re using plain permalinks, make sure you go to Settings > Permalinks and select the Post name option.

MStore Pro supports user registrations. If you want to use this feature, go to Settings > General and enable the Anyone can register option.

Lastly, you must generate an API key for WooCommerce’s REST API. To do so go to WooCommerce > Settings > REST API and press the Create an API key button. In the form that pops up, add a simple description to the key and press the Generate API key button.

Key generation form

Once the key’s generated, you’ll have access to two strings: a consumer key and a consumer secret.

Generated key strings

5. Configure the App

Almost all the important configuration files of the template are present in the src/common/ directory. For the rest of this tutorial, we’ll be modifying files in this directory.

cd src/common

To point your MStore Pro app to your WordPress instance, open the AppConfig.json file using any text editor. There, inside the WooCommerce object, update the url key to the URL of your WordPress instance. Then update the consumerKey and consumerSecret to the strings you generated in the previous step.

"WooCommerce": {
    "url": "https://example.com/wordpress/",
    "consumerKey": "ck_28ed657b985de90f4ec9229f32d4ce73411251121100",
    "consumerSecret": "cs_89bd6677fe547e587115b21e95a4172777ffa22910"
}

read more

How to Link Your WordPress Site with Your MailChimp Mailing List and Get More Signups

Final product image
What You’ll Be Creating

There are a variety of ways of keeping in touch with people who visit your websites.

You can encourage them to become subscribers by adding a Subscribe widget. You can use the Jetpack plugin to make it easier for existing WordPress.com users to keep up to date. Or you can encourage people who visit your website to sign up for a mailing list.

Mailing lists are often dismissed as an outdated form of marketing. Changes to data protection laws (not least  of which the GDPR) and the supposed demise of email mean that many marketers and website owners are reluctant to use a mailing list to maintain contact with their visitors and customers.

read more

Top 7 Membership and Custom User Login and Registration WordPress Plugins

Membership and user profiles are a very important aspect of a website. They allow you to take control of your content by it to premium members only. They also allow you to create more income from your website. Membership can also be a way to establish yourself as an authority in your particular niche. 

Login and registration pages are the first pages your users interact with when they come to your site. It’s critical to ensure that the process of registration is seamless. The design should also be attractive to ensure users don’t turn away.

read more

How to Add an Audio Player to Your WordPress Site With a Free Plugin

Today, we’ll explore the HTML5 Audio Player plugin which allows you to embed and play audio files on your WordPress site. In this post, we’ll go through the different aspects of this plugin and we’ll also explore how to use this plugin to embed audio players in your WordPress site.

WordPress 15 Best WordPress Audio Player and Video Player Plugins Jane Baker

There are several reasons you may want to integrate an audio player on your website which can play different audio formats for your visitors—of course, if you are building a music website, it’s a must-have requirement. Also, you would like to choose easy-to-use and lightweight audio player which does the job for you.

read more