Using code snippets and template customizations in child theme

Every now and then you need to modify plugin or theme’s templates, add some code snippet or change couple things using CSS. Best way to include your changes and make them update proof is to do it via child theme. Child theme is special theme that loads parent theme files from parent theme folder and your customized files from child theme folder like templates and styles.

You need to have base (parent) theme like StoreFront (or Avada, Divi, any WooCommerce compatible theme will do just fine) and then you create new folder wp-content\themes\mycustomtheme\ with its own style.css and functions.php

Here is how to create child theme in 4 easy steps:

Step 1: create child theme folder for example /wp-content/themes/my-first-child-theme

Step 2: in that folder create style.css and functions.php filse, in style.css add code below:

/*
Theme Name: My Sample WordPress Child Theme
Theme URI: https://wpgenie.org
Description: StoreFront theme based child theme
Author: wpgenie
Author URI: https://wpgenie.org
Template: storefront
Version: 1.0
*/

Step 3: go to Appearance -> Themes and activate your newly created child theme.

Step 4: you can now add your modified templates to child theme folder, code snippets to your functions.php and custom CSS to your child theme’s style.css

Once you have customizations in your child theme you can now update plugin or theme without worries that your modifications will be lost during an update (theme or plugin update). ZIP with child theme described in this tutorial can be downloaded here (it will work only if you have installed StoreFront theme).

Detailed tutorial is here How to Create a Child Theme an article by WordPress about child themes.

For example you want to edit Simple Auction template from folder \woocommerce-simple-auctions\templates\single-product\bid.php – copy it to wp-content\themes\yourchildtheme\woocommerce\single-product\bid.php and make changes there. You will need some kind of file manager best is to use FTP client (for example FileZilla or file managed included in your hosting control panel).

Illustration from https://zenwp.co/child-theme/
How child theme templating works from https://zenwp.co/child-theme/

We have extensive archive of code snippets and modified plugin templates on our Pastebin archive.

WooCommerce Lottery and Pick Number addon now with Elementor support

Today we have released version 2.0.0 for WooCommerce Lottery and Pick Number Mod addon which include full Elementor support. In today’s update there were few minor changes and fixes too and version has been bumped to v2.0.0 for both plugin and addon.

Couple of screenshots how it looks like Elmentor support:

WooCommerce Lottery and Pick Number addon natively supported in Elementor

Easiest way to create your single lottery page with Elementor is to create new template for single product. There you can now add, rearrange and style Woo Lottery elements like countdown, progress bar, lottery winner, lottery info and Pick Number Mod elements like ticket numbers, lucky dip and question / answers. Get WooCommerce Lottery here and Pick Number Mod addon here.

Support access problem – 401 API forbidden

We had couple of cases when, during access to ticket system, users might get 401 API forbidden error message. Here is quick explanation of what is really happening here and what is causing this error. Since our support system is integrated via CodeCanyon / Envato API to check and verify your purchase / licence you need to approve API access for your account. This is normally done during registration process (when you open our support page on this URL https://wpgenie.org/support without being logged in). When this process is skipped, support system cannot access data via API for your account and system displays that error.

To resolve that problem log out from Envato / CodeCanyon and then go to https://wpgenie.org/support click login and allow API access. Once this is done and you have valid purchase you will be able to open ticket.

In case you still have problem please contact us.

Complete List of WordPress Language Locales

List of WordPress locales useful for multilanguage and translations.

Locale Name Native Name Locale Code WordPress Locale
Afrikaans Afrikaans af af
Akan Akan ak ak
Albanian Shqip sq sq
Algerian Arabic الدارجة الجزايرية arq arq
Amharic አማርኛ am am
Arabic العربية ar ar
Armenian Հայերեն hy hy
Aromanian Armãneashce rup rup_MK
Arpitan Arpitan frp frp
Assamese অসমীয়া as as
Azerbaijani Azərbaycan dili az az
Azerbaijani (Turkey) Azərbaycan Türkcəsi az-tr az_TR
Balochi Southern بلوچی مکرانی bcc bcc
Bashkir башҡорт теле ba ba
Basque Euskara eu eu
Belarusian Беларуская мова bel bel
Bengali বাংলা bn bn_BD
Bosnian Bosanski bs bs_BA
Breton Brezhoneg br bre
Bulgarian Български bg bg_BG
Catalan Català ca ca
Catalan (Balear) Català (Balear) bal bal
Cebuano Cebuano ceb ceb
Chinese (China) 简体中文 zh-cn zh_CN
Chinese (Hong Kong) 香港中文版 zh-hk zh_HK
Chinese (Taiwan) 繁體中文 zh-tw zh_TW
Corsican Corsu co co
Croatian Hrvatski hr hr
Czech Čeština‎ cs cs_CZ
Danish Dansk da da_DK
Dhivehi ދިވެހި dv dv
Dutch Nederlands nl nl_NL
Dutch (Belgium) Nederlands (België) nl-be nl_BE
Dzongkha རྫོང་ཁ dzo dzo
Emoji (Emoji) art-xemoji art_xemoji
English English en en_US
English (Australia) English (Australia) en-au en_AU
English (Canada) English (Canada) en-ca en_CA
English (New Zealand) English (New Zealand) en-nz en_NZ
English (South Africa) English (South Africa) en-sa en_SA
English (UK) English (UK) en-gb en_GB
Esperanto Esperanto eo eo
Estonian Eesti et et
Faroese Føroyskt fo fo
Finnish Suomi fi fi
French (Belgium) Français de Belgique fr-be fr_BE
French (Canada) Français du Canada fr-ca fr_CA
French (France) Français fr fr_FR
Frisian Frysk fy fy
Friulian Friulian fur fur
Fulah Pulaar fuc fuc
Galician Galego gl gl_ES
Georgian ქართული ka ka_GE
German Deutsch de de_DE
German (Switzerland) Deutsch (Schweiz) de-ch de_CH
Greek Ελληνικά el el
Greenlandic Kalaallisut kal kal
Guaraní Avañe’ẽ gn gn
Gujarati ગુજરાતી gu gu
Hawaiian Ōlelo Hawaiʻi haw haw_US
Hazaragi هزاره گی haz haz
Hebrew עִבְרִית he he_IL
Hindi हिन्दी hi hi_IN
Hungarian Magyar hu hu_HU
Icelandic Íslenska is is_IS
Ido Ido ido ido
Indonesian Bahasa Indonesia id id_ID
Irish Gaelige ga ga
Italian Italiano it it_IT
Japanese 日本語 ja ja
Javanese Basa Jawa jv jv_ID
Kabyle Taqbaylit kab kab
Kannada ಕನ್ನಡ kn kn
Kazakh Қазақ тілі kk kk
Khmer ភាសាខ្មែរ km km
Kinyarwanda Ikinyarwanda kin kin
Kirghiz кыргыз тили ky ky_KY
Korean 한국어 ko ko_KR
Kurdish (Sorani) كوردی ckb ckb
Lao ພາສາລາວ lo lo
Latvian Latviešu valoda lv lv
Limburgish Limburgs li li
Lingala Ngala lin lin
Lithuanian Lietuvių kalba lt lt_LT
Luxembourgish Lëtzebuergesch lb lb_LU
Macedonian Македонски јазик mk mk_MK
Malagasy Malagasy mg mg_MG
Malay Bahasa Melayu ms ms_MY
Malayalam മലയാളം ml ml_IN
Maori Te Reo Māori mri mri
Marathi मराठी mr mr
Mingrelian მარგალური ნინა xmf xmf
Mongolian Монгол mn mn
Montenegrin Crnogorski jezik me me_ME
Moroccan Arabic العربية المغربية ary ary
Myanmar (Burmese) ဗမာစာ mya my_MM
Nepali नेपाली ne ne_NP
Norwegian (Bokmål) Norsk bokmål nb nb_NO
Norwegian (Nynorsk) Norsk nynorsk nn nn_NO
Occitan Occitan oci oci
Oriya ଓଡ଼ିଆ ory ory
Ossetic Ирон os os
Pashto پښتو ps ps
Persian فارسی fa fa_IR
Persian (Afghanistan) (فارسی (افغانستان fa-af fa_AF
Polish Polski pl pl_PL
Portuguese (Brazil) Português do Brasil pt-br pt_BR
Portuguese (Portugal) Português pt pt_PT
Punjabi ਪੰਜਾਬੀ pa pa_IN
Rohingya Ruáinga rhg rhg
Romanian Română ro ro_RO
Romansh Vallader Rumantsch Vallader roh roh
Russian Русский ru ru_RU
Rusyn Русиньскый rue rue
Sakha Сахалыы sah sah
Sanskrit भारतम् sa_in sa_IN
Sardinian Sardu srd srd
Scottish Gaelic Gàidhlig gd gd
Serbian Српски језик sr sr_RS
Silesian Ślōnskŏ gŏdka szl szl
Sindhi سنڌي snd snd
Sinhala සිංහල si si_LK
Slovak Slovenčina sk sk_SK
Slovenian Slovenščina sl sl_SI
Somali Afsoomaali so so_SO
South Azerbaijani گؤنئی آذربایجان azb azb
Spanish (Argentina) Español de Argentina es-ar es_AR
Spanish (Chile) Español de Chile es-cl es_CL
Spanish (Colombia) Español de Colombia es-co es_CO
Spanish (Guatemala) Español de Guatemala es-gt es_GT
Spanish (Mexico) Español de México es-mx es_MX
Spanish (Peru) Español de Perú es-pe es_PE
Spanish (Puerto Rico) Español de Puerto Rico es-pr es_PR
Spanish (Spain) Español es es_ES
Spanish (Venezuela) Español de Venezuela es-ve es_VE
Sundanese Basa Sunda su su_ID
Swahili Kiswahili sw sw
Swedish Svenska sv sv_SE
Swiss German Schwyzerdütsch gsw gsw
Tagalog Tagalog tl tl
Tahitian Reo Tahiti tah tah
Tajik Тоҷикӣ tg tg
Tamazight (Central Atlas) ⵜⴰⵎⴰⵣⵉⵖⵜ tzm tzm
Tamil தமிழ் ta ta_IN
Tamil (Sri Lanka) தமிழ் ta-lk ta_LK
Tatar Татар теле tt tt_RU
Telugu తెలుగు te te
Thai ไทย th th
Tibetan བོད་སྐད bo bo
Tigrinya ትግርኛ tir tir
Turkish Türkçe tr tr_TR
Turkmen Türkmençe tuk tuk
Tweants Twents twd twd
Uighur Uyƣurqə ug ug_CN
Ukrainian Українська uk uk
Urdu اردو ur ur
Uzbek O‘zbekcha uz uz_UZ
Vietnamese Tiếng Việt vi vi
Walloon Walon wa wa
Welsh Cymraeg cy cy
Yoruba Yorùbá yor yor

Tutorial – Add lottery, competition or lucky draw with prizes to your WooCommerce store

Have you ever purchased lottery or entered lucky draw? Every now and then there is occasion to reward your customers with prizes or give opportunity to enter the draw for an item (with huge discount or for just a fraction of real price). E-store owners who run their webshops on WooCommerce can improve their user experience, boost sales and get more traffic with thousands of plugins and practically with couple of clicks add new premium feature to their store. Our WooCommerce Lottery plugin does just that – implements lotteries in WooCommerce based store.  We will describe here what do you need to setup lottery in your webshop which runs on Woo.

Here we will assume you allready have working WordPress website hosted somewhere (if not contact us for help with hosting), domain name and WooCommerce installed with payment processor set up. Other requirements are true cronjobs (just ask your host support to setup cronjobs needed) if you want to have reliable way to send email notifications and end lotteries on time.

Now to get your first lottery online you need to follow couple of simple steps:

  1. you need to purchase and download WooCommerce Lottery plugin here
  2. install lottery plugin as any other plugin in WordPress (follow installation instructions here if you are not sure how to install WordPress plugin)
  3. after plugin activation you will need to go to Producst -> Add new product to setup your first lottery on your website. This part should look like screenshot below. Here you populate details like descriptions and prize for your lottery / competition / draw, min and max number of tickets, max tickets per user, number of winners, price, start / end date, image etc.
  4. Once you publish your first lottery your customers will be able to participate in the draw after they purchase and complete order for ticket(s). On this link here you can see our demo website example and how lottery will look like for customer (this depends on your WordPress theme ofcourse). This part is also customizable via WooCommerce templates and theme’s custom CSS.
  5. So your lottery is running till the date you set in its details. Right after end date and if you reached your min tickets limit plugin will draw winner or winners using PHP’s mt_rand function which provides solid randomization and gives everyone equal chance for winning. Winner(s) will get email notification about winning the prize, others will get better luck next time notification while site owner gets notification about finished or failed lottery. Here site owner usually also contacts winner to define details and deliver the prize.

Some owners want ticket pick or question / answer feature (or manually choose winners when you use 3rd party number generator) which can be added via WooCommerce Lottery Pick Ticket Number Modification (here is how pick number mod looks like). Others would like to end lottery and draw prize as soon as all tickets are sold, change countdown format or disable mixing lotteries with normal products – this is just a matter of changing a setting in Lottery Settings (there are plenty of settings which allows quick customization).

If you installed Lottery plugin and have some questions or encountered a problem which you cannot solve yourself there is always documentation which covers all the details and support which will help you with issues. In case you have a question drop us mail here.