- This topic has 10 replies, 2 voices, and was last updated 2 years ago by Tom.
November 20, 2019 at 1:28 pm #1069137Curt
Yes, I know IE11 is a dinosaur. But I have to provide *some* support nonetheless.
In IE11 only: I have an image/ad unit in the generate_hook_before_main_content slot that extends all the way to the right of the page, underneath the generate_before_right_sidebar_content hook in my right sidebar.
Any attributes you can suggest to get the main_content hook to align with the main content container?
CurtNovember 20, 2019 at 2:46 pm #1069268TomLead DeveloperLead Developer
Can you try giving the hook a lower priority?
add_action( 'generate_hook_before_main_content', 'my_function', 1 );
1being the super low priority.
Let me know 🙂November 20, 2019 at 2:55 pm #1069274Curt
No change. Main content hook still runs full width of the page, under the sidebar hook.
And I’m not that concerned about which of those is on top. I’m more worried about constraining the main content hook.November 20, 2019 at 2:59 pm #1069277TomLead DeveloperLead DeveloperNovember 20, 2019 at 3:18 pm #1069298Curt
Sorry. I’m doing this all through the Appearance > Elements interface. Where would I find that function?November 20, 2019 at 3:19 pm #1069300TomLead DeveloperLead DeveloperNovember 20, 2019 at 3:25 pm #1069308Curt
Hmmm. That appears to have worked. Thanks much!
Now I’m curious how that priority setting works, especially when – as you mentioned – the hook placement isn’t inside the main content container.November 20, 2019 at 3:31 pm #1069315Curt
Any insight on that would be much appreciated. Thanks for helping get a quick resolution!!November 20, 2019 at 5:20 pm #1069407TomLead DeveloperLead Developer
All hooks have a default priority of
10. The lower the priority, the earlier the hook fires.
In this case, our columns container for the blog is hooked in using the
10priority, so by defining a lower priority for your Hook, it makes it so the element displays before the columns container.November 22, 2019 at 7:32 am #1072635Curt
Ahhhhh, good to know. Thanks Tom!November 22, 2019 at 8:36 am #1072792
- You must be logged in to reply to this topic.