Documentation
Browsersupport
The Theme supports Chrome, Firefox, Safari, Edge. It works for Internet Explorer 11 in a limited way.
Required plugins
- Woocommerce
- Custom Post Type UI
- Contact Form 7
- Relevanssi
Make products searchable by SKU
After you setup the wordpress theme and installed all required plugins follow these steps:
- Head to "Plugins" in WP-Admin and look for the "Relevanssi" plugin
- Click on "Settings"
- Navigate to the tab "Indexing"
- Head to the settings section "Custom Fields"
- Select "some" from the dropdown menu
- Enter this exact term into the text field: "_sku" (without the quotes of course)
- Deactivate "expand shortcodes" on the same page. Shortcodes search does not work well with woocommerce.
- Save your settings.
- Head to the tab "Search"
- Deactivate "exclude_from_search" if you would like to index product variations as well.
- Head back to the tab "indexing"
- Now click "Build the Index" and wait till the plugins finishes its work
- Done!
Product Import Generator
- Select the menu item "SONAX Theme" on the left side
- A submenu opens below, where the item "Product Import Generator" can be selected
- You can now select your language and enter the SKUs / article numbers that you would like to import
- By clicking the "Next" button the system automatically generates a .csv file based on the product data from sonax.de
- Open the .csv file with a suitable tool such as Visual Studio Code
- Translate the texts within the tool and save the .csv file on your computer
- Return to the backend and select the menu item "Products" on the left side
- Click on the "Import" button on top and select the previously saved file from your computer
- Click "Continue" and check if every column is matched correctly
- Start the importer by clicking the corresponding button
Translating the theme
When translating the theme we highly recommend to use the child-theme. If you do not use the child-theme and translate the main/parent-theme your translation might get deleted when the theme is updated. By using the child-theme you circumvent this issue and the parent theme can be updated without interfering with your customizations.
Creating a new translation
- Activate the child theme
- Install PoEdit from here
- Download the translation file (
sonax.pot
) from above - Open PoEdit and setup the translation process
- Select "Edit a translation" and open the
sonax.pot
file - When the translation file is opened click "Create New Translation" at the very bottom
- Select the language you want to translate to in the dialog
- Select "Edit a translation" and open the
- PoEdit now shows every translatable term of the theme and you can start translating them.
- After you finished translating save the language files to the child theme
- Click "File -> Save as"
- Choose the folder "languages" in the child-theme (not the parent-theme!) or upload them to the child-theme folder "languages" if you translated locally.
- Done!
Troubleshooting
If your translation is not picked up by wordpress, you might have a mismatch between your translated language (in the .po
and .mo
file) and the selected language of wordpress.
German translations for example have multiple different locales (e.g. de_DE
, de_AT
etc.). You can find the code of your selected language of wordpress in the html code:
- Open up any customer facing site of your wordpress installation (e.g. the homepage)
- Right click on the page and select "View Page Source" (Chrome or Firefox)
- You will see the source code of your page
- At the very top you should see the first line with the
<html>
-Tag - The tag will include an attribute "lang" with the exact locale, for example
<html lang="de-DE" class="no-js no-svg">
, which means your selected language isde_DE
- Now make sure to name your translation files to match the "lang", in our example the selected language is
de_DE
, so the files should be namedde_DE.po
andde_DE.mo
(Note the underscore!)
Video walkthrough
Updating a translation
When introducing new features in the theme, new translatable terms might arise that have not been covered by your initial translation process yet. Luckily you can update your existing translation files to include the newly introduced terms so you can translate them.
- Download the latest translation file (
sonax.pot
) from above - Open PoEdit and open your existing translation files (e.g.
/child-theme/languages/de_DE.po
) - Update the existing file from the updated
sonax.pot
file:- Select "Catalogue -> Update from POT File..."
- In the dialogue select the
sonax.pot
file and click "Open"
- PoEdit now shows every (new and updated) translatable term of the theme and you can start translating them.
- After you finished translating save the language files to the child theme
- Click "File -> Save as"
- Choose the folder "languages" in the child-theme (not the parent-theme!) or upload them to the child-theme folder "languages" if you translated locally.
- Done!
Video walkthrough
Authoring Content
This part of the documentation has been moved to its own dedicated page.
Customizing the theme
Again when customizing or extending the theme we highly recommend to use the child-theme. Otherwise your customizations to the parent-theme will get deleted if you update the theme.
For more information on how to customize a theme through a child theme visit the official wordpress documentation.
Fonts
- Select the menu item "SONAX Theme" on the left side
- A submenu opens below, where the item "Settings" can be selected
- Please read the terms and conditions below the heading "Font Licensing"
- Check the box "Enable license font" - Note: By doing so, you automatically agree to the terms and conditions
- Save the changes by clicking the "Save Changes"-Button at the bottom of the site
- The new Futura font will be loaded and displayed on the website