- This topic has 2 replies, 2 voices, and was last updated 3 years, 6 months ago by Tom.
January 18, 2017 at 10:33 am #265483Dean
I’m working on a site with GP Premium and Elementor Pro.
Two relevant test pages are:
1 (no sidebar): http://www.theterritorycollection.com.au/dk_test_layout/
2 (sidebar): http://www.theterritorycollection.com.au/test_launch_pad/
Using code from https://generatepress.com/forums/search/GP+Hooks+inside+container+above+sidebar/ I was able to add the relevant DIV to the GP Hooks After Header section for the rotating images slideshow, so that it is the full width of the container and sits above the site content DIV.
I then have the orange background text container “Call the Territory Experts” that, when there is no sidebar, sits inside the site container (so whitespace around it, nicely). See LINK 1 above — this is what I like.
However, when I use a page with a sidebar (LINK 2 above) — the orange background text container is constrained only above the main text area, and doesn’t stretch above the sidebar.
In GP Hooks in the AFTER HEADER section I tried:
<div class="grid-container"> <?php echo do_shortcode( '[elementor-template id="379"]' ); ?> <div class="site-content"> <?php echo do_shortcode( '[elementor-template id="383"]' ); ?> </div></div>
But that leaves nothing behind the orange bar (ie, you can see the page background) — I want to have white behind it as if it is in the INSIDE CONTENT CONTAINER section, but above the sidebar.
(Would be great maybe to have a GP Hook for this page of the page, inside the container but before the site content and sidebar!!).
I’m stuck as to if I should move the orange text box shortcode back into the AFTER HEADER — but not sure what DIV class to apply — if that is possible to do? Or a way to have it in INSIDE CONTENT CONTAINER but stretch over the sidebar so the sidebar is placed below it?
Thanks for any advice!January 18, 2017 at 10:41 am #265485Dean
PS: It seems to me that putting the Orange Box in “Inside Content Container” should display above any sidebar, but “Before Content” would display just above the content and not the sidebar … but this is not how it appears on the pages.January 18, 2017 at 7:57 pm #265610TomLead DeveloperLead Developer
After Header is definitely what you’re looking for in this case.
Try adding your shortcode inside the
<div class="inside-article"> Your shortcodes </div>
- You must be logged in to reply to this topic.