Changing Path to Wiki Page Links to Point to Wiki Directory
-
I am using the Wiki Page Links plugin and want to change it so that it works with WP Wiki. I want to append a hardcoded path to my directory in the URL to the page name so that all Wiki Links go to my Wiki.
Right now:
[mypage]
Links to:
example.com/mypage
I need to point to a Wiki page like this one:
example.com/wiki/mycategory/mypage
So I need to add /wiki/mycategory/ to the URL constructor, but I don’t know the syntax.
Here is the code I think that needs to change:
list($link, $page_title) = $this->wiki_get_piped_title($full_link); //We have a page link. //TODO: cut down on db hits and get the list of pages instead. if ( $page = get_page_by_title(html_entity_decode($link, ENT_QUOTES)) ) { //I THINK THIS HREF NEEDS CHANGED TO INCLUDE PATH TO /wiki/mycategory $content = str_replace($match, "<a href='". get_permalink($page->ID) ."'>$page_title</a>", $content); }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Changing Path to Wiki Page Links to Point to Wiki Directory’ is closed to new replies.