Tips and tricks | Set of articles to help you modify your Creatus WordPress Theme https://themezly.com Home of Premium WordPress Themes and Plugins Thu, 07 Dec 2017 16:07:53 +0000 en-US hourly 1 https://wordpress.org/?v=5.5.3 https://themezly.com/wp-content/uploads/2018/06/cropped-themezly-favicon-150x150.png Tips and tricks | Set of articles to help you modify your Creatus WordPress Theme https://themezly.com 32 32 CSS helpers https://themezly.com/docs/css-helpers/ Wed, 15 Feb 2017 20:22:53 +0000 http://localhost/Creatus/Themezly/?post_type=docs&p=549 List of most used CSS helpers

The post CSS helpers appeared first on Themezly™.

]]>

This is a list of most used CSS helpers. For a complete list of helper classes browse creatus/assets/css/thz-units.css and creatus/assets/css/thz-utility.css files.

Font size

Set element font size.

<div class="thz-fs-16">...</div> /* 0 - 100 in increments of 1 */

Font weight

Set element font weight.

<div class="thz-fw-400">...</div> /* 100 - 900 in increments of 100 */

Letter spacing

Set element letter spacing.

<div class="thz-ls5">...</div> /* -10 - 50 in increments of 1. Use dash for negative value like thz-ls-5 */

Opacity

Set element opacity.

<div class="thz-opacity-50">...</div> /* 0 - 100 in increments of 1. 100 = completely visible */

Width

Set element percentage width.

<div class="thz-width-100">...</div>
<div class="thz-width-75">...</div>
<div class="thz-width-50">...</div>
<div class="thz-width-25">...</div>
<div class="thz-width-20">...</div>
<div class="thz-width-16">...</div>

Max-width

Set element max-width.

<div class="thz-width-75">...</div> /* 5 - 100 in increments of 5. */   

Padding

Set element padding.

/* 0 - 100 in increments of 1. pt = top | pr = right | pb = bottom | pl = left */
<div class="thz-pt-20">...</div> 

Vertical padding

Set element vertical padding.

<div class="thz-vp-20">...</div> /* 0 - 100 in increments of 1. */

Horizontal padding

Set element horizontal padding.

<div class="thz-hp-20">...</div> /* 0 - 100 in increments of 1. */

Margin

Set element margin.

/* 0 - 100 in increments of 1. mt = top | mr = right | mb = bottom | ml = left */
<div class="thz-mt-20">...</div> 

Negative Margin

Set element negative margin.

/* 0 - 100 in increments of 1. mt = top | mr = right | mb = bottom | ml = left */
<div class="thz-mt-n20">...</div> 

Horizontal Spacer

Set space between elements by adding a spacer.

<div class="some-element">...</div>
<div class="thz-spacer-30"></div> /* 1 - 100 in increments of 1. */
<div class="some-element">...</div>     

Hide elements

Set element hide class to hide the element on specific devices.

<div class="thz-desktop-hidden">...</div> /* Hidden on desktop */
<div class="thz-tablet-hidden">...</div> /* Hidden on tablets */
<div class="thz-mobile-hidden">...</div> /* Hidden on mobiles */

Floats

Float an element.

<div class="thz-float-left">...</div> /* Float left */
<div class="thz-float-right">...</div> /* Float right */
<div class="thz-float-none">...</div> /* No float */

Clear

Clear element floats.

<div class="thz-clear">...</div> 

The post CSS helpers appeared first on Themezly™.

]]>
PHP helpers https://themezly.com/docs/php-helpers/ Wed, 15 Feb 2017 20:24:01 +0000 http://localhost/Creatus/Themezly/?post_type=docs&p=552 List of most used PHP helpers

The post PHP helpers appeared first on Themezly™.

]]>

This is a extended list of most used PHP helpers. For a complete list of helpers and utility functions please browse creatus/inc/helpers.php and creatus/inc/utility.php files.
Beside Creatus PHP helpers here is a list of Unyson PHP Helpers that you can use.

Get option

Return theme option value. If theme option is set in post/taxonomy custom option, it returns post/taxonomy custom option value instead.

thz_get_option( $option_id, $default_value = null );

Get theme option

Return only theme option value.

thz_get_theme_option( $option_id, $default_value = null );

Get post option

Return post or tax option value.

thz_get_post_option( $option_id = null, $default_value = null );

Get global option

Return portfolio, category, post or page option

_thz_fw_get_global_option ( $option_id, $default_value = null );

WP file system

Return wp_filesystem, initiate if not available.

thz_wp_file_system()

Theme uri

Return theme url. If child-theme is active return child-theme url.

thz_theme_uri()

Theme dir

Return theme dir. If child-theme is active return child-theme dir.

thz_theme_dir();

Theme file url

Return theme file uri. If file exists in child-theme return child-theme file uri.

/**
 * Search relative path in child than in parent theme directory and return URI
 * @param  string $rel_path '/some/path_to_dir' or '/some/path_to_file.php'
 * @return string URI
 */
thz_theme_file_uri( $rel_path );

Theme file path

Return theme file path. If file exists in child-theme return child-theme file path.

/**
 * Search relative path in child then in parent theme directory and return full path
 * @param  string $rel_path '/some/path_to_dir' or '/some/path_to_file.php'
 * @return string path
 */
thz_theme_file_path( $rel_path )

Theme version

Return current theme version.

thz_theme_version()

Sanitize class names

Retur sanitized HTML element class names.

thz_sanitize_class( $classnames, $fallback = null )

Property unit

Returns clean number with specified unit. If no match, fallback is used as unit.
Allowed units are px, %, rem, em, vw, vh, vmin ,vmax.
If $auto is set to true it allows auto as value if found. If $none is set to true it allows none as value if found.

thz_property_unit( $val, $default, $auto = false, $none = false )

Replace palette colors

Creatus color options can use palette codes like color_1 in output. Use this function to convert the color palette strings with actual color value. The function is able to convert multiple color codes and large strings like complete CSS files.

thz_replace_palette_colors( $string, $palette = false)

The post PHP helpers appeared first on Themezly™.

]]>
How to create site backup https://themezly.com/docs/how-to-create-site-backup/ Tue, 27 Jun 2017 10:58:31 +0000 https://themezly.com/?post_type=docs&p=847 Instructions on How to create site backup

The post How to create site backup appeared first on Themezly™.

]]>

In this video we will show you step by step instructions on how to create your WordPress website backup with Creatus WordPress Theme framework backup extension.

The post How to create site backup appeared first on Themezly™.

]]>
How to Increase the Post Max Size Limit https://themezly.com/docs/how-to-increase-the-post-max-size-limit-2/ Tue, 14 Nov 2017 17:03:47 +0000 https://themezly.com/?post_type=docs&p=935 Instructions on How to Increase the Post Max Size Limit

The post How to Increase the Post Max Size Limit appeared first on Themezly™.

]]>

Info

Max Post Size is the maximum size for all POST body data.

The post_max_size directive can be set in .htaccess, php.ini , .user.ini or wp-config.php file. To gain access to these files you will need FTP credentials. If you do not have these please contact your hosting provider.

  1. In your WordPress root installation locate any of these .htaccess, php.ini, .user.ini or wp-config.php
  2. Edit the file and paste the directive code
  3. Once you are done making changes save the file. If you have downloaded the file to make this change, upload it back to your server and override the existing file.

Directive for .htaccess

php_value post_max_size 32M

Directive for php.ini or .user.ini

post_max_size=32M

Directive for wp-config.php

@ini_set( 'post_max_size' , '32M' );

The minimum recommended size is 32M

Warning

Changing server directives is recommended to site owners who are confident to do so. If you rather have professionals do this for you, contact your hosting provider.

The post How to Increase the Post Max Size Limit appeared first on Themezly™.

]]>
How to Increase the Max Input Vars Limit https://themezly.com/docs/how-to-increase-the-max-input-vars-limit/ Tue, 14 Nov 2017 17:03:10 +0000 https://themezly.com/?post_type=docs&p=931 Instructions on How to Increase the Max Input Vars Limit

The post How to Increase the Max Input Vars Limit appeared first on Themezly™.

]]>

Info

PHP Max Input Vars is the maximum number of variables your server can use for a single function to avoid overloads.

The max_input_vars directive can be set in .htaccess, php.ini , .user.ini or wp-config.php file. To gain access to these files you will need FTP credentials. If you do not have these please contact your hosting provider.

  1. In your WordPress root installation locate any of these .htaccess, php.ini, .user.ini or wp-config.php
  2. Edit the file and paste the directive code
  3. Once you are done making changes save the file. If you have downloaded the file to make this change, upload it back to your server and override the existing file.

Directive for .htaccess

php_value max_input_vars 4000

Directive for php.ini or .user.ini

max_input_vars =4000

Directive for wp-config.php

@ini_set( 'max_input_vars' , 4000 );

The minimum recommended limit is 4000

Warning

Changing server directives is recommended to site owners who are confident to do so. If you rather have professionals do this for you, contact your hosting provider.

The post How to Increase the Max Input Vars Limit appeared first on Themezly™.

]]>
How to Increase the Max Upload Size Limit https://themezly.com/docs/how-to-increase-the-max-upload-size-limit/ Tue, 14 Nov 2017 17:03:29 +0000 https://themezly.com/?post_type=docs&p=933 Instructions on How to Increase the Max Upload Size Limit

The post How to Increase the Max Upload Size Limit appeared first on Themezly™.

]]>

Info

Max Upload Size is the largest file size that can be uploaded to your WordPress installation.

The upload_max_filesize directive can be set in .htaccess, php.ini , .user.ini or wp-config.php file. To gain access to these files you will need FTP credentials. If you do not have these please contact your hosting provider.

  1. In your WordPress root installation locate any of these .htaccess, php.ini, .user.ini or wp-config.php
  2. Edit the file and paste the directive code
  3. Once you are done making changes save the file. If you have downloaded the file to make this change, upload it back to your server and override the existing file.

Directive for .htaccess

php_value upload_max_filesize 32M

Directive for php.ini or .user.ini

upload_max_filesize=32M

Directive for wp-config.php

@ini_set( 'upload_max_size' , '32M' );

The minimum recommended size is 32M

Warning

Changing server directives is recommended to site owners who are confident to do so. If you rather have professionals do this for you, contact your hosting provider.

The post How to Increase the Max Upload Size Limit appeared first on Themezly™.

]]>
How to Increase the Max Execution Time Limit https://themezly.com/docs/how-to-increase-the-max-execution-time-limit/ Tue, 14 Nov 2017 17:04:07 +0000 https://themezly.com/?post_type=docs&p=937 Instructions on How to Increase the Max Execution Time Limit

The post How to Increase the Max Execution Time Limit appeared first on Themezly™.

]]>

Info

Max Execution Time is the amount of time (in seconds) that your site will spend on a single operation before timing out (to avoid server lockups)

The max_execution_time directive can be set in .htaccess, php.ini , .user.ini or wp-config.php file. To gain access to these files you will need FTP credentials. If you do not have these please contact your hosting provider.

  1. In your WordPress root installation locate any of these .htaccess, php.ini, .user.ini or wp-config.php
  2. Edit the file and paste the directive code
  3. Once you are done making changes save the file. If you have downloaded the file to make this change, upload it back to your server and override the existing file.

Directive for .htaccess

php_value max_execution_time 300

Directive for php.ini or .user.ini

max_execution_time=300

Directive for wp-config.php

@ini_set( 'max_execution_time' , '300' );

The minimum recommended size is 300

Warning

Changing server directives is recommended to site owners who are confident to do so. If you rather have professionals do this for you, contact your hosting provider.

The post How to Increase the Max Execution Time Limit appeared first on Themezly™.

]]>
How to add custom background layer shapes https://themezly.com/docs/how-to-add-custom-background-layer-shapes/ Thu, 07 Dec 2017 16:07:53 +0000 https://themezly.com/?post_type=docs&p=1136 Instructions on How to add custom background layer shapes

The post How to add custom background layer shapes appeared first on Themezly™.

]]>

Creatus theme container elements like hero sections, section, section slider, column and inner column have a layer option that adds a background layer to the container. These particular elements also have a Shape background type enabled that comes with over 25 custom shapes that you can use. If these do not fit to your design, follow the instruction below to add your own SVG shapes to the list;

  1. Create a responsive SVG shape. Recommended viewBox should be 1000x500 px
  2. Edit the SVG file and add a class thz-svg-shape thz-svg-{shape_file_name}
  3. Place your shape in creatus_child/assets/images/shapes folder.
  4. Add action to creatus_child/functions.php file

Info

Shapes should be created with fill or stroke not the combo of both. If your shape has been created with a stroke than add a stroke suffix at the end of the file name eg; spiral-stroke.svg. This is required in order to use custom colors for the shape.

/*
 * Adds shape to shape background list
 * svg needs to be created like this for preview to work and the,
 * class name should contain the exact file name, eg; thz-svg-myfan
 * <svg xmlns="http://www.w3.org/2000/svg" class="thz-svg-shape thz-svg-smoke" viewBox="0 0 1000 500" preserveAspectRatio="none">
 *  ...  your paths
 * </svg>
 */

function my_filter_background_shapes_list ($list, $id){

    $new_list = array(
        /*
         * key must be same as the svg file , no extension;
         * smoke.svg = smoke
         */ 
        'smoke' => esc_html__('Smoke', 'creatus'),
        'myfan' => esc_html__('My Fan', 'creatus'),

    );

    foreach ( $new_list as $shape => $name ){
        $list[$shape]= array(
            'text' => $name,
            'attr' => array(
                /*
                 * enable|disable flip option
                 */ 
                'data-enable' => '.'.$id.'-shape-flip-parent',
            )
        );      
    }

    unset( $new_list );

    return $list;
}

add_filter('thz_filter_background_shapes_list', 'my_filter_background_shapes_list', 10, 2 );

The post How to add custom background layer shapes appeared first on Themezly™.

]]>