I don’t understand why I need a lower priority to remove an action with a higher priority to make it work
You’re misunderstanding how priority works here somewhat. The priority determines the order that the functions run for a given hook, eg. genesis_entry_header. Priority is not global. When removing an action from a hook you need to use the same priority that the action was originally hooked with. Which you’re doing. You’re adding the action at … Read more