is_admin returning false in backend in server side rendered block #16731
Labels
[Package] Server Side Render
/packages/server-side-render
[Type] Help Request
Help with setup, implementation, or "How do I?" questions.
I have a server side rendered block that lists cards with page thumbnails and the title wrapped in a link.
I want that the link only gets a href when I'm in the frontend so I avoid clicking on the cards by mistake in the backend and getting redirected to the card page.
Here is my code:
Unfortunately is_admin() is returning false in the backend in the block itself. I really don't know why, the only thing I can think about is that it's because the block is server side rendered.
Is there a way around?
The text was updated successfully, but these errors were encountered: