WordPress.org

Ready to get started?Download WordPress

Forums

Customizr
How to add a static content after the Slider in home page? (6 posts)

  1. rahul3010
    Member
    Posted 1 year ago #

    I want to add a static content with Image just after the Slider on home page. This content should be after slider and above the featured pages

  2. Martin
    Member
    Posted 1 year ago #

    Hi I also would like to know how to do this

  3. acub
    Member
    Posted 1 year ago #

  4. nikeo
    Member
    Theme Author

    Posted 1 year ago #

    Hi,

    Another approach would be to use the customizr action hooks with priorities :
    Copy and paste those examples in your functions.php

    1) Example with hook '__after_header'

    do_action ( '__after_header', 'my_content_after_slider', $priority = 100 );
    
    function my_content_after_slider () {
    if (!is_home() || !is_front_page() )
    return;
    ?>
    <div class="container">
    <p>This is a my static content</p>
    </div>
    <?php
    }

    2) Example with hook '__before_main_container' :

    do_action ( '__before_main_container', 'my_content_before_featured_pages', $priority = 0 );
    
    function my_content_before_featured_pages () {
    if (!is_home() || !is_front_page() )
    return;
    ?>
    <div class="container">
    <p>This is a my static content</p>
    </div>
    <?php
    }

    Hope this helps, thanks for your feedbacks

  5. rahul3010
    Member
    Posted 1 year ago #

    Thanks for the help. I could add content below the slider however the content i added isn't responsive. Its not being wrapped when the window size changes as compared to other content on page.

    Please help.

  6. acub
    Member
    Posted 1 year ago #

    If you wrap a truck in rubber it won't shrink, nor will it become elastic.

    You need to learn to work with media queries and apply them to your custom content to make it responsive. Also, keep in mind that Customizr uses the Bootstrap library, and all you need to do is apply the classes to your content. They're already embedded in the theme.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic