Avada Forums Community Forum Custom 100% Template in Child-Theme

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • orangedental
    Participant
    Post count: 2

    Hello everyone,
    I’ve created a child theme and copied the 100% width template, changed the name and added a custom script.
    Unfortunately the 100% template doesn’t seem to have all the information to make the page actually full width but avada checks wether the name of the template is “100% width” and dynamically adds css classes to overwrite other stuff.

    I really need several custom templates to makes some custom javascript stuff work, any idea where I can add other templates so they will get the 100% classes as well?

    SalisburyCAMRA
    Participant
    Post count: 5

    If you have fixed this please let us know how, I have the same question.

    orangedental
    Participant
    Post count: 2

    I did!

    There are two ways of going about it.

    The easy way, which I did, is adding a function like this in your functions.php:

    function myfunction_is_hundred_percent_template() {
    if (is_page_template( array('100-width.php','myTemplate.php') ) ){
    $value=true;
    }
    return $value;
    }
    add_filter( 'fusion_is_hundred_percent_template', 'myfunction_is_hundred_percent_template', 11, 0 );

    The ’11’ is the priority of the applied filter, 10 being the default, 11 being lower than most. ‘0’ is the amount of arguments you give to the “myfunction” function. You can give something like the page_id, but the way I did it is the simplest.

    The other way would be looking into class-avada-layout.php (includes/class-avada-layout.php).
    There you’ll find a “public function is_hundred_percent_template” which you can modify.

    SalisburyCAMRA
    Participant
    Post count: 5

    Thank you @orangedental. I’m a little disappointed that no one from themefusion support replied.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.