Reload - Responsive Multi-Purpose Theme

Contents

1. Visual Composer cannot be auto updated (since version 4.9)

2. How to change default Form Title: Drop us a line... ?

3. How to enable VC's Grid Elements

4. How to update Reload and its required plugins?

5. How to use a child theme?

6. How to add custom Analytics Code

7. How to add custom fonts via Child Theme?

8. How to translate Reload's strings by using .po files ?

9. I've noticed that the .svg header images are not showing. I've double checked and the images are there. How do i fix this?

10. When required plugins (Visual Composer and/or Greatives Visual Composer Extension) need to be updated what steps should you follow?

11. How to update the Revolution Slider when it is packaged with your theme?

12. Recommended Server Settings - Memory issues

13. How to overwrite Standard Form with a Contact Form 7 Form ( Via hook in Reload Child Theme )?

14. WP & Theme updates – Important!

15. How to create 5-Columns layout via the Page Builder

16. Add your own API key for the Google Maps

17. Fonts not displayed correctly

18. Adding Custom JS Code via Child Theme

19. How to translate your logo with WPML

1. Visual Composer cannot be auto updated (since version 4.9)

This is a VC's bug. Basically, since we handle these updates you should not see this message. We have already informed the VC's team about this and they will provide a fix in the next release. Then you will need to remove and reinstall the new version as the auto update will not work because of this bug. So:

  1. Deactivate the Visual Composer
  2. Make the update while it is deactivated
  3. Activate again the VC and you will get the new version which is included in the theme

Notice that there is nothing to worry about this process, you are not going to lose your data :)

Important: There is no need to purchase a licence for the Visual Composer (for any of our themes) as it is included in our themes. Read this article.

2. How to change default Form Title: Drop us a line... ?

Changing Default Form Title: Drop us a line...

Option 1: From Theme .po .mo Files
- Change text from Reload Theme .po .mo files ( Path: \reload\languages )

Option 2: From Child Theme .po .mo Files
- Upload and Activate Reload Child Theme
- Change text from Child Theme .po .mo files ( Path: \reload-child\languages )

Option 3: Using a hook from Child Theme
- Upload and Activate Reload Child Theme
- Add the following or similar snippet in functions.php of Child Theme

function grve_child_form_title() {
return 'Get in touch'; //form title
}
add_filter( 'grve_header_form_title', 'grve_child_form_title' );


With Option 1 you will have to update again the .po, .mo files in case you update the Theme to a newer version.
With Option 2 and 3 you will not loose your changes even if you upload an updated Theme.

Note: Child Theme is also useful to translate your Theme files. If you don't want to use Child Theme translations you can comment out the load_child_theme_textdomain line in functions.php of Child Theme.

3. How to enable VC's Grid Elements

Visual Composer's Grid Elements are by default disabled. Each one of our themes provide their own handcrafted grid elements.

If in any case you need to re-enable the default Grid Elements of Visual composer, you need to add a filter hook in your Child Theme.

Just add the following snippet in the functions.php file of your Child Theme.

function grve_child_vc_grid_visibility() {
    return true;
}
add_filter( 'grve_vc_grid_visibility', 'grve_child_vc_grid_visibility' );

All Grid Elements will then be visible and configurable.

4. How to update Reload and its required plugins?

How to use the Reload Theme auto Update

This is for sure the easiest and fastest way to update Reload. The only thing you have to do is to activate the theme update and enter your Themeforest username and an API key (from Envato).

Follow the steps below in order to use the auto update:

  1. Go Theme Options--> Theme Update
  2. Enable Theme Update
  3. Insert your Themeforest username and an API key from your Envato account
  4. Save changes and you're ready.

When there is a new update of Reload you will be informed (message at top) in Appearance-->Themes screen and in Theme Options screen. Then you will be able to update Reload with just one-click. Don't forget to update the required plugins in case that you are prompted (read the last 5 steps in this page).

How to update Reload (old-school method)

This is the old-school method for the updates of Reload.
Follow the steps below:

  1. Deactivate Reload - (activate one of the WP themes like Fourteen)
  2. Delete Reload
  3. Upload and install the new version of Reload, then activate it.

If you won't get an info message prompting you to update one or both of the required plugins of Reload (Visual Composer and Greatives Visual Composer Extension) you're ready.

In case you prompt to update any or both of the required plugins (Visual Composer and/or Greatives Visual Composer Extension)

  1. Deactivate Reload
  2. Go Plugins, find and delete the plugins that need to be updated (Visual Composer and/or Greatives Visual Composer Extension)
  3. Activate Reload again
  4. You will notice a new info message prompting to install these plugins. Click Begin Installing Plugins so to install it/them.
  5. You're ready to go!

The overall process will take about 2 minutes. In case that you have a live site and you don't want visitors to see another theme(like Fourteen) while you 're updating Reload, use one of the maintenance plugins like Ultimate Coming Soon Page.

5. How to use a child theme?

Firstly, if you need small css changes you can use the CSS Options (to place your code) in Theme Options.
For more advanced customization it’s better to use a Child Theme ( A sample Child Theme is provided in the main.zip file).

A child theme is a theme that inherits the functionality and styling of another theme, called the parent theme.
Child themes are the recommended way of modifying an existing theme.

More information can be found on the official WordPress Codex: https://codex.wordpress.org/Child_Themes

For example, if you’ve ever edited PHP files (or JS files), then you know how hard it can be to upgrade your theme later.

Generally, a WordPress child theme allows you to modify or/and add functionality of that parent theme. So install both themes (themename and themename-child), activate the child theme and you ensure that changes you make to the files are not overwritten when upgrading the main theme.

If you need to edit PHP files(or JS files), the first thing you need to do is replicate the old file before we start to modify it. So, copy and paste the theme’s original file into your child theme folder ensuring that the file name and location is exactly the same. For example, if you want to modify the themename/folder-name/file1.php, then you would copy and paste this file to themename-child/folder-name/file1.php. Then, you can open and make any necessary changes.

When you activate the Child Theme you need to assign again your Menus Locations and Widgets.

By using a child theme, you don’t have to worry about the updates of the parent Theme.

6. How to add custom Analytics Code

Theme offers Google Analytics Tracking Code ( Classic/Universal ), by providing only the Tracking ID. Adding a custom analytics code instead of Google Tracking code is possible via Child Theme.

Function grve_print_tracking_code is used to print the tracking code to the header and can be overwritten.

To overwrite the function just add the function to your functions.php file of the Child Theme.

function grve_print_tracking_code() {
?>
<script type='text/javascript'>
    //Custom Tracking Code
</script>
<?php
}

Your tracking code will then replace the Google Tracking script

Another option is to use the default WordPress hooks using your own function.

Adding a function like:

function grve_child_theme_print_custom_code() {
?>
    <!-- Your custom Code -->
<?php
}

And use either the wp_head hook for header

add_action( 'wp_head', 'grve_child_theme_print_custom_code' );

or the wp_footer hook for footer

add_action( 'wp_footer', 'grve_child_theme_print_custom_code' );

7. How to add custom fonts via Child Theme?

Under Theme Options - Typography you can select a variety of Standard and Google Fonts.

In some cases you might need to use a Custom Font, we have implemented a solution to add your Custom Fonts and be able to select them in the Typography section of our options panel ( Theme Options - Typography ).

To use fonts in WordPress it's normally required to add some css code in your header. The remaining part is to be able to select it from the Font Family combo boxes.

Of course you can also add refined css code under Theme Options - CSS/JS Options - CSS Code.

Web fonts are provided in various formats:

Usually some documentation is already provided when you purchase a custom Font. A sample css is normally included in the documentation.

As an example we'll use a font called: MyCustomFont and a dummy site URL.

You need to replace them with the actual Font Family name and your site URL. In this example fonts are uploaded in a folder webfonts inside you WordPress uploads directory.

Add the following snippet in the functions.php file of your Child Theme.

function grve_child_theme_print_custom_fonts() {
?>
<style type="text/css">
    @font-face {
        font-family: 'MyCustomFont';
        src: url('http://www.yourdomainname.xxx/wp-content/uploads/webfonts/MyCustomFont.eot');
        src: url('http://www.yourdomainname.xxx/wp-content/uploads/webfonts/MyCustomFont.eot?#iefix') format('embedded-opentype'),
        url('http://www.yourdomainname.xxx/wp-content/uploads/webfonts/MyCustomFont.woff2') format('woff2'),
        url('http://www.yourdomainname.xxx/wp-content/uploads/webfonts/MyCustomFont.woff') format('woff'),
        url('http://www.yourdomainname.xxx/wp-content/uploads/webfonts/MyCustomFont.ttf') format('truetype'),
        url('http://www.yourdomainname.xxx/wp-content/uploads/webfonts/MyCustomFont.svg#wf') format('svg');
    }
</style>
<?php
}
add_action( 'wp_head', 'grve_child_theme_print_custom_fonts' );

function grve_child_theme_custom_font_selection( $std_fonts ) {
    $my_custom_fonts = array(
        "MyCustomFont"    => "MyCustomFont",            
    );
    return array_merge($std_fonts, $my_custom_fonts);
}
add_filter( 'grve_std_fonts', 'grve_child_theme_custom_font_selection' );

The first function adds CSS and the second adds the fonts to the Font Family selectors.

In $my_custom_fonts array you can also add additional fonts. Your custom Fonts will be added as Standard Fonts in all Font Family selectors under: Theme Options - Typography Options.

This way you can add as many custom fonts as you like.

8. How to translate Reload's strings by using .po files ?

Option 1: From Theme .po .mo Files by using a program like Poedit and named them like en_Us.po (in your language).
- Change text from Reload Theme .po .mo files ( Path: \reload\languages )

Option 2: From Child Theme .po .mo Files (with the same way like Option 1)
- Upload and Activate Reload Child Theme
- Change text from Child Theme .po .mo files ( Path: \reload-child\languages )

With Option 1 you will have to update again the .po, .mo files in case you update the Theme to a newer version.
With Option 2 you will not lose your changes even if you upload an updated Theme.

Note: Finally, you need to go to Settings > General and at the bottom of this page select your preferred language. See the screenshot below.

9. I've noticed that the .svg header images are not showing. I've double checked and the images are there. How do i fix this?

This is probably a problem with your server and .svg icons. Paste the following lines in your .htaccess file :

AddType image/svg+xml svg svgz
AddEncoding gzip svgz
AddType text/x-component .htc

We hope this is helpful for you.

Cheers.

10. When required plugins (Visual Composer and/or Greatives Visual Composer Extension) need to be updated what steps should you follow?

First of all, when any or both of these plugins need to be updated you will get an info message immediately after the installation of the new version of Reload.

Just follow the steps below:

  1. Deactivate Reload
  2. Go Plugins, find and delete the plugins that need to be updated (Visual Composer and/or Greatives Visual Composer Extension)
  3. Activate Reload again
  4. You will notice a new info message prompting to install these plugins. Click Begin Installing Plugins so to install it/them.
  5. You're ready to go!

We hope this is helpful for you!

11. How to update the Revolution Slider when it is packaged with your theme?

Please read carefully the instructions from the ThemePunch team on how you can update the Rev Slider if it is included with a theme you purchased.

Read this article - http://www.themepunch.com/faq/update-plugin-packaged-theme/

12. Recommended Server Settings - Memory issues

There are hundreds of thousands of web hosts out there, not all of them are fit for a WordPress installation. There are a few (well-known) low budget host providers that you can experience multiple issues when you use a premium, high quality theme (demo import issues, images upload etc). As you can easily understand this is out the scope of our support and something that you need to sort out with your host provider. At least, make sure you have covered the basics: WordPress Minimum Requirements

Recommended PHP and MySQL versions:

Themes and Plugins often require more memory than the server default values. In some server installations some php variables are very low and not recommended for WordPress installations with premium Themes or/and multiple Plugins.

Recommended php variable values:

Snippet for php.ini

    memory_limit = 256M 
    post_max_size = 128M 
    upload_max_filesize = 32M  
    max_input_vars = 3000
    max_execution_time = 300

Snippet for .htaccess

  php_value memory_limit 256M
  php_value post_max_size 128M
  php_value upload_max_filesize 32M
  php_value max_input_vars 3000
  php_value max_execution_time 300

Note: If you have already a larger number or if you don't have any issues, you don't need to modify them.

Keep in mind that some values must be larger than others: memory_limit > post_max_size > upload_max_filesize

These values can be changed with the following methods:

One of the most important files in your WordPress installation is the wp-config.php file. This file is located in the root of your WordPress file directory and contains your website's base configuration details, such as database connection information.

WP_MEMORY_LIMIT option allows you to specify the maximum amount of memory that can be consumed by PHP. This setting may be necessary in the event you receive a message such as "Allowed memory size of xxxxxx bytes exhausted".

This setting increases PHP Memory only for WordPress, not other applications. By default, WordPress will attempt to increase memory allocated to PHP to 40MB. Increasing memory allocated to PHP

Increase PHP Memory to 96M

define( 'WP_MEMORY_LIMIT', '96M' );

Administration tasks require much memory than usual operation. When in the administration area, the memory can be increased or decreased from the WP_MEMORY_LIMIT by defining WP_MAX_MEMORY_LIMIT.

define( 'WP_MAX_MEMORY_LIMIT', '256M' );

Please note, this has to be put before wp-settings.php inclusion.

13. How to overwrite Standard Form with a Contact Form 7 Form ( Via hook in Reload Child Theme )?

If you want to keep the use of the icon with Contact Form 7, you can overwrite it via a filter function from e.g: Reload Child Theme. You can add the following function to your Child Theme functions.php file.

function grve_child_theme_my_form() {
    return do_shortcode( '[contact-form-7 id="4" title="Contact form 1"]' );
}
add_filter( 'grve_header_form', 'grve_child_theme_my_form' );

Just change the id with your contact form 7 id and it will replace the standard form with your form.

14. WP & Theme updates – Important!

When a major WP release arises it is crucial not to update WP version unless you are 100% sure that our Theme is compatible at that particular time. Proper order of update is Theme first, WP later.

It is very important to stay always updated in both Theme & related plugins. Proper way of updating Theme & related plugins can be found here:

You could frequently check the changelog of our Themes in the following links:

In that way you can always be sure that your site will always work flawlessly.

15. How to create 5-Columns layout via the Page Builder

WPBakery Page Builder does not support 1/5 column currently. They might implement it in next releases though. When they do that we'll also adapt our code to be compatible with the Builder.

An easy trick to simulate 5 columns with the current grid is to select Custom and add a row with the following custom row configuration:

1/12 + 1/6 + 1/6 + 1/6 + 1/6 + 1/6 + 1/12

Obviously, leave the first and last 1/12 columns empty. On mobiles, you can return to full width and hide the 1/12 columns.

16. Add your own API key for the Google Maps

In some case it is needed a different API key for the Google maps. 

So please:

1. Generate an API key from here https://developers.google.com/maps/documentation/javascript/get-api-key 

2. Place your API key in the related field in Theme Options > Map Options.



Alternative solution with the child theme

1. Generate an API key from here https://developers.google.com/maps/documentation/javascript/get-api-key 

2. Use the child theme to add one of the following functions according to the theme you are using:

//Blade Theme
function grve_child_map_scripts() {
 wp_register_script( 'blade-grve-googleapi-script', '//maps.googleapis.com/maps/api/js?key=API-KEY', NULL, NULL, true );
}
add_action( 'wp_enqueue_scripts', 'grve_child_map_scripts' );
//Osmosis - Reload
function grve_child_map_scripts() {
 wp_register_script( 'grve-googleapi-script', '//maps.googleapis.com/maps/api/js?key=API-KEY', NULL, NULL, true );
}
add_action( 'wp_enqueue_scripts', 'grve_child_map_scripts' );

3. Place your API key in the API-KEY space you see in the function.

17. Fonts not displayed correctly

If you serve fonts files from different domains, fonts might not displayed correctly due to Cross-origin resource sharing (CORS). More info about CORS here: https://en.wikipedia.org/wiki/Cross-origin_resource_sharing

Chrome, Firefox and newer versions of Internet Explorer enforce the Cross-Origin Resource Sharing standard, and thus only render web fonts served with the appropriate “Access-Control-Allow-Origin” response header.

For example if you have more than one domain/sub-domain to show your site, fonts might not be displayed correctly in your other domains/sub-domains. This might affect Font Icons like Awesome Fonts or custom fonts hosted from your server.

Use-case:
http://www.sampledomain.com ( fonts shown correctly )
http://subdomain.sampledomain.com ( fonts not shown correctly )

To solve this issue you need to set the appropriate “Access-Control-Allow-Origin” response header.

You can modify your .htaccess file to allow fonts from another domain.

<FilesMatch "\.(ttf|otf|eot|woff|woff2)$">
    <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "http://subdomain.sampledomain.com"
    </IfModule>
</FilesMatch>

or allow fonts from all domains ( in case you have more than one domain that is mapped to your site )

<FilesMatch "\.(ttf|otf|eot|woff|woff2)$">
    <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"
    </IfModule>
</FilesMatch>

Depending on the server similar code must be configured ( e.g: for IIS7 or nginx )

More info here: http://enable-cors.org/server.html

18. Adding Custom JS Code via Child Theme

Sometimes a script is too complicated and needs additional php conditions or other custom code.

In case you want to use your own custom javascript code without the use of the integrated javascript editor from Theme Options, you could use the default WordPress hooks with your own function via a Child Theme.

This way you can combine javascript and php code.

Depending on the hook you can add your code either after the head tag or just below the closing body tag.

For example you could add a function like:

function grve_child_theme_print_custom_code() {
?>
    <!-- Your custom Code -->
<?php
}

And use either the wp_head hook for header ( head tag )

add_action( 'wp_head', 'grve_child_theme_print_custom_code' );

or the wp_footer hook for footer( just before end body tag )

add_action( 'wp_footer', 'grve_child_theme_print_custom_code' );

19. How to translate your logo with WPML

You can easily translate your logo via the String translation if you use the following procedure: