current_page_item class not added to homepage on wordpress

I am currently working on my own portfolio website using wordpress. I added a custom dynamic menu which links to a couple of category pages and static pages. I have also styled the menu to have a hover and current page state i.e – I changed its background colour when you’re on that page or hover. I did this using the current_page_item class which gets added to the current page’s li in the menu ul when you are on that page.

This is all working as expected on my local version of the site.

Read More

I recently uploaded my site to my hosting provider’s server and edited the database dump sql file with a text editor finding and replacing the various site url instances to the new address i.e -howell2code.com instead of howell2code.local.

The version of the site at www.howell2code.com now no longer highlights the “home” link when you are on the homepage and the “current_page_item” class does not appear to be added to the li.

Does anyone have an idea why that could be the case? I know I could target it with CSS individually but I would rather have it working properly if possible.

Related posts

Leave a Reply

1 comment