I found these pieces of PHP code helping me solving my problem of selecting and styling the menu of the current page. I’ve never worked with PHP before and ask for a bit of support.
Hi Rob,
It looks like you’ve got a block of code from a WordPress site there.
is_page is a Wordpress PHP function that determines if the current
page is the same as the one you want to check against. Unless you are
planning to incorporate this into a WordPress site I’m sorry to say
that the code won’t work as it stands.
What you need a is a function that looks at the current link and
compares it to the page URL. If they match then you can set a style on
the link.
I found these pieces of PHP code helping me solving my problem of
selecting and styling the menu of the current page. I’ve never
worked with PHP before and ask for a bit of support.