Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #637671

    My goal is to have a layerslider inside the header. This is because I want then the header to be stretched and fixed so that the content scrolls underneath. I could put the slider in a color section but then everything would be overlayed covering the slider. So I tried this function in my child functions.php:

    function add_stuff_to_header_func() {	  
        HTML goes here
    }
    add_action('ava_after_main_menu', 'add_stuff_to_header_func');

    …but can’t figure out how to embed the slider (i.e layerslider 3) and all I get in return is an empty page.
    Then I tried to edit header.php in my child theme adding:
    <?php if ( is_page( 'home' )) echo do_shortcode('[layerslider id="3"]'); ?>
    …right after wrap_all with no success.
    Any suggestion? Thanks

    • This topic was modified 8 years ago by alby54.
    #637885

    Hey Alberto,

    Could you provide us with a link to the site in question so that we can take a closer look please?

    Regards,
    Rikard

    #637958

    Actually what I did so far is setting a normal header (links in private content since it’s not my own website) and as you can see I’m having troubles narrowing the viewport that’s why I’m thinking about putting everything in a slider.

    #638364

    In a couple of days I have to show the correct layout to my client…….any clue?

    #638402

    Hi!

    Sorry for the delay, please do not bump your tickets as it will push to the bottom and we cannot get to it quickly.

    Add a header widget as mentioned in this link http://kriesi.at/documentation/enfold/adding-a-widget-area-to-the-header/

    Then use a text widget with a shortcode to the slider in it :)

    Let us know if you have any questions…

    Regards,
    Vinay

    #638580

    Thank you I’ll give it a try…..sorry for the bumb. Can I add more than one widget area? I have one header for the home page and at least another one for regular pages.

    #638605

    OK, I’ve tried what you suggested and I have 2 questions. Without extra plugin I cannot put shortcodes in a widget (I’ve tried 3 plugins : Shortcode widget to insert shortcodesdirectly in the widget area, and php text widget,php code widget to insert the slider by php code……none of them worked). Since all I get in the header area is the old header and the shotcode visible as text and not the slider…. how do I insert a layerslider in the Text widget? Second question…..what should I do with the old header setting? Should I insert a blank gif as a logo…..or everything gets bypassed by the header in widget function? (I don’t think so because I can still see it)

    #638683

    Wait…..my fault. I just figured out that I can’t insert the slider via shortcode in the widget with the Enfold version of the plugin so I purchased the full version. Now I see the slider in my homepage but I don’t know how to insert a different slider for the other pages ’cause the enfold_customization_header_widget_area function, the way it is, allows me to set only one custom widget. Should I try to insert a conditional statement in the function? Something like:

    add_action( 'ava_main_header', 'enfold_customization_header_widget_area' );
    function enfold_customization_header_widget_area() {
    	 if ( is_page( 'home' )) {
    	dynamic_sidebar( 'header' );
    }
    else {
    	dynamic_sidebar( 'whatever' );
    }
    }

    Thank you for your support

    #639065

    Hi,

    Yes, using conditional function like is_page() should work if you want to display different sliders on specific pages.

    Best regards,
    Ismael

    #639296

    Thank you, I just used the above function and it worked like a charm! Also with ‘wp-mobile-detect’ plugin I was able to edit the widget assigning different sliders for iPad and mobile,,,,,Great!!

    • This reply was modified 8 years ago by alby54.
    #639718

    Hi,

    Great you found a workaround for this and thanks for sharing the tip here.

    Please feel free to contact us via new ticket if you have more questions :)

    Thank you for using Enfold.

    Best regards,
    Vinay

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Layerslider in header’ is closed to new replies.