Site logo

Archived topic

Hooks overlapping on IE11

10 replies · Started by Curt on November 20, 2019

Viewing posts 1–11 of 11

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?

Thanks,
Curt

Hi there,

Can you try giving the hook a lower priority?

For example: add_action( 'generate_hook_before_main_content', 'my_function', 1 );

1 being the super low priority.

Let me know :)

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.

I think the issue is that the survey-tab element is inside the columns container. Can you share your function with me?

Sorry. I'm doing this all through the Appearance > Elements interface. Where would I find that function?

In the Hook options, you'll see a "Priority" option - try setting that to 1.

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.

Any insight on that would be much appreciated. Thanks for helping get a quick resolution!!

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 10 priority, so by defining a lower priority for your Hook, it makes it so the element displays before the columns container.

Ahhhhh, good to know. Thanks Tom!

You're welcome :)

This archived topic is closed to new replies.