Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter johnzoro

    (@johnzoro)

    https://www.pubshed.co.uk is my website for reference

    Theme Author Tom

    (@edge22)

    By opt in box do you mean your slider?

    Does the slider itself have an option to go full width? Currently it’s setting itself to be 1600px wide.

    Thread Starter johnzoro

    (@johnzoro)

    hi tom, no the slider is fine.

    underneath the slider i want to add another “section” so to speak with an opt in box and some text in the middle

    I’ve got the mailerlite plug in which adds a form to the page, but i want it in a section if that makes sense?

    Thread Starter johnzoro

    (@johnzoro)

    I’ve added the opt in box now as I believe when you saw the page i had removed it.

    [mailerlite_form form_id=1]

    is the short code

    Thread Starter johnzoro

    (@johnzoro)

    https://www.foodtruckr.com this is a site that has a similar effect that i am trying to achieve

    Theme Author Tom

    (@edge22)

    How are you adding the slider?

    You’ll want to add the HTML for your opt-in box in the exact same way, just below the slider (I’m assuming).

    Let me know ??

    Thread Starter johnzoro

    (@johnzoro)

    The slider is PHP like what you told me before so

    add_action( ‘generate_after_header’,’generate_add_homepage_slider’ );
    function generate_add_homepage_slider()
    {
    if ( ! is_front_page() )
    return;

    echo do_shortcode( ‘[smartslider3 slider=3]’ );

    }

    So if I wanted the opt in box underneath could i just put

    add_action( ‘generate_after_homepage_slider’,’generate_add_optin’ );
    function generate_add_optin()
    {
    if ( ! is_front_page() )
    return;

    echo do_shortcode( ‘[mailerlite_form form_id=1]’ );

    }

    Theme Author Tom

    (@edge22)

    Exactly, or bundle the two together:

    add_action( 'generate_after_header','generate_add_homepage_slider' );
    function generate_add_homepage_slider()
    {
        if ( ! is_front_page() )
            return;
    
        echo do_shortcode( '[smartslider3 slider=3]' );
        echo do_shortcode( '[mailerlite_form form_id=1]' );
    }
    Thread Starter johnzoro

    (@johnzoro)

    Wow! My guess-code didn’t work, but your bundling them together did.

    Thread Starter johnzoro

    (@johnzoro)

    Is there an easy way to add some padding via custom css?

    Thread Starter johnzoro

    (@johnzoro)

    never mind i sorted it ??

    Theme Author Tom

    (@edge22)

    Awesome ??

    Thread Starter johnzoro

    (@johnzoro)

    tom, i’ve made 3 blocks in the php thingy

    is there a way to have one

    then a normal section that isn’t full screen

    then a full screen section?

    like say for example i want the latest posts section back to the normal generatepress layout

    but i want the slider section and the opt in section to remain as they are

    but i want it in that order

    slider

    latest posts

    opt in

    is that possible?

    Theme Author Tom

    (@edge22)

    You could try..

    add_action( 'generate_after_header','generate_add_homepage_slider' );
    function generate_add_homepage_slider()
    {
        if ( ! is_front_page() )
            return;
    
        echo do_shortcode( '[smartslider3 slider=3]' );
    }
    
    add_action( 'generate_before_footer','generate_add_homepage_opt' );
    function generate_add_homepage_opt()
    {
        if ( ! is_front_page() )
            return;
    
        echo do_shortcode( '[mailerlite_form form_id=1]' );
    }
Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Opt In Box Full Width’ is closed to new replies.