Open bobbingwide opened 3 years ago
The logic in thisis_fiddle_nav_atts()
doesn't properly cater for links of the form
https://s.b/wp55/thisis/?page_id=nn
The link to the blog, in the header is of this form, with page_id=36.
When the URL is parsed the resulting value matches the $url_path
, so this is shown as the current menu item when we're viewing the home page.
Conversely, when we visit the blog page Blog is not considered to be the current menu item
Change the URL to use a permalink.
The Contact link suffers a similar prolem since the actual URL is about/contact
rather than contact
.
The Contact page link needs correcting.
The templates and template parts which contain hard coded links prefixed
https://s.b/wp55/thisis/
are acceptable when used in a local development environment but not at all acceptable in a live site. The browser attempts to finds.b
and takes an awfully long time. Alternatively, in my local development environment, I may not notice the switch.Given that this is an experimental theme, and I expect to make many changes to template parts with navigation blocks, it would make sense to automatically adjust any URL starting
https://s.b/thisis/
to the siteurl(). This may result in a 404, but that’s OK.Requirement
Proposed solution