Open plazareff opened 4 years ago
As a temporary workaround, I modified the file wp-post-modal-public.js:
line 229, replaced basename(postLink)
by $this[0].pathname
What do you think the best way to determine if something is a subpage? Another attribute on the a tag?
There's no way to do it automatically that I can think of.
I'm not especially at ease with Wordpress development, so I can't tell if there's another WP function that would be more useful than get_page_by_path.
On the JS side, I think I would analyze the href attribute to see if it's a full or relative url, compare the domain name with the current page and act accordingly. My basic opinion being that basename() should be avoided.
I'll look deeper into it when I get some time, closer to the release of the site I'm currently on as I don't like the idea to leave the client with a "hacked" plugin for upgrade's sake anyway...
Thank You for your message ;-)
When the "modal-link" link is of type '/parent-page/subpage", the plugin does not find the page (404) as it calls the
get_page_by_path
WP function but only passes the permalink (subpage) where it should pass the whole path (parentpage/subpage)