Support Has Moved!

Please post all new questions on the new support system

Before posting a discussion topic, be sure to check out our Forum Rules and Support Policy.

Get design feedback and approval with our newest WordPress plugin, ProjectHuddle. Check it out →

Latest Struck Version is 1.06

Latest GridStack Version is 1.1

Latest Edition Version is 1.6

Latest District Version is 1.2.6

Latest ExtraNews Version is 1.4.9

Latest Aware Version is 1.4

Latest BigFormat Version is 1.4

Latest Bookcase Version is 1.54

Latest Ellipsis Version is 1.5

Sections

mtesfamichael's Avatar

mtesfamichael

13 Aug, 2015 05:36 PM

Hi,

Also how do i add a section immediately following the slider so that that section has a background image that fills the entire background.
i was able to add a section before the footer, however i can't seem to add it immediately after the slider so that there is no spaces.
Please note this is for my homepage, not all the pages.
Is there a way to call the section specific id in my php code for the template_home.php?

thanks.

  1. 1 Posted by Eric Schmidt on 14 Aug, 2015 01:54 PM

    Eric Schmidt's Avatar

    Hi,

    You would need to move where the sections get output for your home page. This will require editing the template-home.php file, or better yet copy that file into a child theme to make the change there.

    Move this code block...

    <?php
    /* Get Any Sections
    ================================================== */
    echo get_template_part('functions/templates/sections'); ?>
    

    To come right after the slider...

    <?php 
    /* Get Full Width Slider
    ================================================== */
    echo get_template_part('functions/templates/full-width-slider/slider'); ?>
    

    Eric

  2. Eric Schmidt closed this discussion on 14 Aug, 2015 01:54 PM.

  3. mtesfamichael re-opened this discussion on 14 Aug, 2015 01:56 PM

  4. 2 Posted by mtesfamichael on 14 Aug, 2015 01:56 PM

    mtesfamichael's Avatar

    Hi Eric, i actually tried that and it showed all my sections below the slider which is not what i want.
    so i have two sections designed for the front page.
    i am trying to show one section immediately after the slider.
    the footer section works perfectly.
    so is there a way to show:
    section id 123 -->below slider
    section id 456-->before footer ---> this i got working fine.

    thanks.

  5. 3 Posted by Eric Schmidt on 14 Aug, 2015 02:02 PM

    Eric Schmidt's Avatar

    Hi,

    This would require some edits to the theme files, but it would be possible. I'll try to point you in the right direction. You'd want to copy some code out of the functions/templates/sections.php file and move it to position just after the slider. Basically everything inside the foreach function here...

    // For Each Section 
        foreach ($sections as $section) :
    

    So instead of looping through each section, copy the code inside that foreach, and then set the section you want as that $section variable. So add this to the top of that code...

    $section = 123;
    

    Then leave the sections template part in place below the content. Your section 123 should not be assigned to any page since you're now loading that directly after the slider.

    Eric

  6. 4 Posted by mtesfamichael on 14 Aug, 2015 02:12 PM

    mtesfamichael's Avatar

    it actually worked. i didn't have to copy all the code since i was using only the custom section.
    the ultimately key thing was this: $section = 123;

    thanks for your help.

  7. Eric Schmidt closed this discussion on 17 Aug, 2015 08:00 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac