Greetings WordPress Experts,
I'm looking for some help with a rather specific issue and my hope is that someone here could point me in the right direction.
I'll spare you the long and boring details of the whole reason, but I need to find a method of determining if the page I am currently on is being edited. The reason for this (short version) is that I need to ensure a certain class is not shown when the page is being edited, but to display it when it's not.
I've tried various attempts with get_current_screen
but these are just returning null, and I've also tried to use the global $pagenow
but this just always returns index.php
, despite immediately showing post.php
and then changing.
I've also tried is_admin()
checks, but as I am using a front-end visual builder, it's not technically on the Dashboard.
I simply need to find a method of checking whether or not the page is being edited, and from there, I can figure the rest. As I said, I've tried an extensive search online, and none of the provided solutions work.
I'm curious to know if anyone here has experience with this. If so, please let me know.
Kind regards, Alec