• Hi,

    My site is https://depannageordinateur.fr/
    I use contact form 7
    I have a contact form on the sidebar. But I would like to display the slider (which is full width) above page content and sidebar.
    How do I set the form so that it displays below the meta slider ?

    Thank you very much

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hey redizdead1,

    How are you doing today?

    This can’t be done with CSS as your slider is located in the the separate holder (primary content) which has total width of 75% and it is not in the same element as your sidebar, increasing its width would effectively make whole content full width and push the sidebar below.

    If you’re adding this slider via shortcode there are couple of ways you can do it. You’ll have to edit default page template in your theme and place the slider shortcode just below the div with id=”content”.

    You’ll have to use do shortcode as well, please see here

    And also use conditional tags to check page id so you can display slider only on that specific page, see here.

    Hope this helps ??

    Cheers,
    Bojan

    Thread Starter redizdead1

    (@redizdead1)

    Hi Bojan,

    Thank you for your answer. I’m not advanced enough in pHp to do this right now, but this seems like a good way of learning more, so I’ll go for it.
    Cheers

    Please do, if you get stuck somewhere please let me know ??

    Cheers,
    Bojan

    On the template there is a adres. I want to remove it, and place my own adres.

    Hey Royhofwijks,

    Please open your own thread as your question is not related to the one from the thread opener.

    Best regards,
    Bojan

    Thread Starter redizdead1

    (@redizdead1)

    Hi there,

    I don’t see a div with id=”content” on my page.php file.
    I see this
    `<div id=”primary” class=”content-area”>

    /*so that would be here ? */
    <main id=”main” class=”site-main” role=”main”>

    <?php get_template_part( ‘/templates/titlebar’ ); ?>

    <?php while ( have_posts() ) : the_post(); ?>

    <?php get_template_part( ‘content’, ‘page’ ); ?>

    <?php
    // If comments are open or we have at least one comment, load up the comment template
    if ( comments_open() || get_comments_number() ) :
    comments_template();
    endif;
    ?>

    <?php endwhile; // end of the loop. ?>

    </main><!– #main –>
    </div><!– #primary –>`

    Hey redizdead1,

    I’ve checked the theme that you’re using and the content part is being open in the header.php sorry about that. You can place the following at the bottom of your theme header.php to display slider on your home page only.

    <?php if ( is_front_page() ) { ?>
    
    	<div class="myslider">
    		<?php echo do_shortcode( '[yourshortcode]' ); ?>
    	</div>
    	<?php } ?>

    Replace dummy shortcode with the shortcode of your slider.

    Hope this helps and have a great weekend ??

    Best regards,
    Bojan

    Thread Starter redizdead1

    (@redizdead1)

    It worked perfectly, thank you very much Bojan ?? !
    Have a great day too

    Glad I could help ??

    Cheers,
    Bojan

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to insert contact form in sidebar, below slider ?’ is closed to new replies.