Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #22705


    So I learned you can get the layerslider to work on a PAGE by going to a page and clicking advance theme editor then selecting it under the media tab recently. Thats great it works for that PAGE, but how do I get it to work on the HOMEPAGE of a site?

    The instructions on how to load the layerslider on the site all dont work for me… the short cut code and adding the php code to the actual page both do not render!


    Actually let me clarify.

    Say I have a page called ABOUT. On the left, under ENFOLD tab, I can set that as my homepage. Great! Then I add the layer slider via the advanced them editor. Works great. But then say I go to the ENFOLD tab, and also want the blogs to display on the ABOUT page (so my blogs are on the homepage), I get an error that says

    Fatal error: Call to undefined function layerslider_init() in /usr/home/codemaster/public_html/ on line 119



    Edit the ABOUT page. Go to Advanced Layout Editor then insert the Advanced LayerSlider. Then click Content Elements tab and insert the Blog Posts element. It is up to you to arrange the layout. It works on my end.




    Hi thanks for the reply.

    Yes, if I just add blog post like that it works fine. What Im trying to add is the Enfold grid style blogs. So in the admin, I click ENFOLD, then where it says “Where do you want the display the blog”, I select the same page (i.e. ABOUT) and I get that error.

    So if my “FrontPage setting” is ABOUT page, and I also want to “Display the blog” on ABOUT, I get that error.

    Fatal error: Call to undefined function layerslider_init() in /usr/home/codemaster/public_html/ on line 119

    Would appreciate any help!



    I’m not sure this will resolve your problem but I had a similar issue to what you are describing.

    try using this code in the Default editor (not the advanced editor)

    [av_layerslider id=”1″]

    replace the id=”1″ with the Identifier of the slider you want to show up.

    be aware that it seems to be either /or – you must choose the default or the advanced editor

    it seems that once you have created a page with one type of editor you cannot revert to the other to modify you page/post.

    i’m still testing that though…

    hopes this helps.



    So when I tried that, the page doesnt respond to anything I put in the editor. It simply displays the blog grid style.

    It under the ENFOLD option, whatever you set the page for “And where do you want to display the Blog?”, that page becomes the blog and nothing else. You cant add anything else on that page thru the editor… anyone know how to add to it?


    Ok so I think I am on to something… this piece of code, displays the blog enfold grid style the wya I like it, its found in index.php.

    But the catch is, right now if you display that nice blog style, you dont get to use the page function in wordpress to add anything to top or below it, so cant add layerslider, cant add text nothing. its just a flat display of blogs….

    When I copy this code on to other files, like page.php, it actually displays the blog piece like I want…

    So Im trying to now figure out how to put this on my ABOUT page, which I have looking all nice and pretty… I tried adding it to page.php but it didnt work, my about page must be coming from somewhere else. Trying to figure out where… the code is

    <div class=’container_wrap main_color <?php avia_layout_class( ‘main’ ); ?>’>

    <div class=’container template-blog ‘>

    <div class=’content <?php avia_layout_class( ‘content’ ); ?> units’>


    if(avia_get_option(‘blog_style’,’multi-big’) == ‘blog-grid’)


    $atts = array(‘type’ => ‘grid’, ‘items’ => get_option(‘posts_per_page’), ‘columns’=> 3, ‘class’=>’ (Purchase code hidden if logged out) ‘, ‘paginate’=>’yes’);

    $blog = new avia_post_slider($atts);


    echo “<div class=’entry-content’>”.$blog->html().”</div>”;




    /* Run the loop to output the posts.

    * If you want to overload this in a child theme then include a file

    * called loop-index.php and that will be used instead.


    $more = 0;

    get_template_part( ‘includes/loop’, ‘index’ );



    <!–end content–>




    //get the sidebar

    $avia_config = ‘blog’;

    if(is_front_page()) $avia_config = “frontpage”;



    </div><!–end container–>


    Ok that piece of code has to be hacked into “template-builder.php”, it will drop the blog content style on your page… and it will work with the layer slider. the page will be a bit funky, it looks like youll have to code a lot of the page instead of using page editor which sucks but for my needs it may work ok


    So that works for me…. now layer slider is on top working properly. my page edits via advance editor works and places whatever I putin there on topl.. then finally the pasted index.php code I brought over is loaded last right above the footer, then the footer itself.

    This resolves my problem of utilizing the nice blog grid style feature from this theme into the homepage along with the layer slider and some page features.

    Only disadvantage now is if I wanted to add something AFTER the index.php blog thing, Im not able to do it via the page editor since it loads it all on top. I might be able to figure it out but luckily this is exaclty the design for my needs so Im good.

    Hope this solution helps! If someone knows a more cleaner solution, Id still be interested! :)

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘LayerSlider will not load on homepage’ is closed to new replies.