dscassel
Forum Replies Created
-
Forum: Plugins
In reply to: Choosing post types for Wiki Page LinksHi thhhhh,
I got it.
If you want to change the page that link takes you to, you can just change this url in the code: $home/wp-admin/post-new.php?post_type=page&post_title=$encodedlink
Of course, I don’t think there’s a url in WordPress that will get you exactly what you want. Wiki Page Links is meant ot be a super-simple plugin that only does one thing (well, two, actually, since I added wikipedia links). It gives you an easy way to link to pages.
I’ll happily accept contributions, though. Also, it’s GPL, so you’re welcome to fork it and take it in a different direction.
Forum: Hacks
In reply to: Changing Path to Wiki Page Links to Point to Wiki DirectoryOkay, well, like you guessed, this is what’s generating the link:
"<a href='". get_permalink($page->ID) ."'>$page_title</a>"
In php, strings are joined together with the
.
operator. get_permalink() is a WP API function that retrieves the URL for a post or page.You need to replace that function with a function either from the WP Wiki API (if they have one) or one you make yourself. It could be as simple as something like this:
function get_wiki_link($page_title) return "https://example.com/wiki/mycategory/" . $page_title end
Although that’s only going to work for your website and only so long as your URLs don’t change. There may be better ways to do it, particularly, as I said, if WP Wiki gives you a way to look up their pages.
Good luck!
Forum: Hacks
In reply to: Changing Path to Wiki Page Links to Point to Wiki DirectoryHi jmobi,
I made this plugin because I found myself linking to (a few) pages a lot and wanted an easier way to do that. WP Wiki looks pretty cool, but it’s not something I’m going to use on my sites.
However! This plugin is all free software. You’re very welcome to take the code and create a new plugin based on it to do whatever you want. If make non-WP Wiki-specific changes you think would be useful for the original plugin, I’d love for you to let me know, but really, you’re free to do what you like with it.
I’m glad you’re finding it useful. ??