I am trying to conditionally change a link based on what page a user is on, but I am having trouble finding the correct code to perform the action.
Here is what I want to do (In English to explain the code)
If a user is not logged-in and on a page that is either keyword or a child of keyword (for example, domain.net/keyword/pricing or domain.net/keyword/about or simply domain.net/keyword)
Then Show X
If user is not logged in and on any other page besides those mentioned above
Then Show Y
If user is logged in
Then Don't do anything
I've tried multiple conditionals and read the wordpress codex, but can't figure this one out. I am novice php user, so I wouldn't be surprised if the answer was quite simple.
I appreciate the help in advance!
