I changed jevelin_rand() function.
The many attributes were passed to the element so if we add the first 20 chars to the id of the attributes array it will be unique.
Function inserted in helpers.php function jevelin_entity:
<div>
/** * Create Custom Random Function. */ function jevelin_rand($length = 10) { return substr(str_shuffle(str_repeat($x = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', ceil($length / strlen($x)))), 1, $length); } //function which returns first 20 chars of string, typically $atts from each element function jevelin_entity($className) { return substr(preg_replace('/\W+/', '', strtolower(strip_tags(implode('_', $className)))), 0, 20); }
</div>
The first characters are given when we use instead of jevelin_rand(), the new function generates static assigned unique IDs names, but we must pass $atts in each element.
Example of use in elements instead of rand:
<div>
$id = 'sh-text-group-'.jevelin_entity($atts);
<div>
$element_id = 'vc_column_'.jevelin_entity($atts);
</div>
</div>
Errors in the original stylesheet:
Fixed stylesheet in test website:
I need some functionality for a multilanguage website.
The custom footers (or title bars) for categories on translation language will be possible to set. Also for categories of posts in English and tags.
An affected website with custom footer:
https://cooltronic.pl
I will try to change variables in the code of the theme.