Site logo

Archived topic

Hook not working

9 replies · Started by Norman on June 28, 2021

Viewing posts 1–10 of 10

Hello!

I've been trying to get the language selector from below the video to above it

The below code is now in a Legacy Hook and when I use a new Element Hook it doesn't work for any of the locations

<?php
do_action( 'wpml_footer_language_selector');
?>

How can I move the selector upwards, between the navigation and the video?

Thank you,
Norman

Hi there,

if you use the after_header hook then it should appear above the page hero.

Hello David,

Thanks for your suggestion. It doesn't work though, not sure why

My settings are as follows:
- Hook: Generate_after_header
- Execute shortcode: Checked
- Execute PHP: Unable to execute PHP as DISALLOW_FILE_EDIT is defined.
- Priority: 10

It does show up below the video, but not above

Try changing the Priority to a lower number eg. 5

It doesn't change it. But it works on Firefox though! Not on Chrome..

Is there a way to make it work on Chrome?

EDIT: Sorry, I was wrong. It doesn't work for Firefox as well

Hi Norman,

Changing priority to 5 should work.

Have you tried clear cache? If so, could you also try to disable your cache plugin to test?

Let me know :)

Hello Ying,

I've cleared the cache and disabled the plugins, but it still shows up below the video. It shows up above the header on the other pages though.

I've made the front page header with the new Element Header, while the other pages are still Legacy Headers. Maybe this matters?

That's weird. But usually, 5 is good enough to bring it before the header element.

Could you try a smaller value, eg: 1 instead of 5?

Let me know :)

Hello Ying,

It still doesn't work. Maybe there is something in the css that prevents it from moving? I don't understand why it does move for the other pages though. These details are like puzzles

Thank you for helping:)

I've already checked CSS, but didn't see anything special.

Are you using ignore language option in the header element?

Maybe it conflicts with the legacy headers, can you try to disable all the legacy headers assigned to the front page no matter what langauage is to test?

This archived topic is closed to new replies.