After searching several hours, I’ve decided to crowd-source this one. I have a client who uses WordPress very frequently, they often have to create a link to a certain page for collecting donations – the issue is they always get the link wrong (long story, but they always screw it up!). I’ve been searching for a plugin or tutorial on how I can add a button to the editor that would automatically add the link to their post – ensuring the link is always correct. As mentioned I searched several hours and was wondering if someone could point me in the right direction. Thanks!
Leave a Reply
You must be logged in to post a comment.
You can make a button to the Tinymce editor that adds a pre defined link like this youtube button:
Put this in your functions.php theme file:
And then make a link.js file and put it in your theme root with this in it:
Change http://mylink.com to the link you want to add.
Also add a icon called mylink.png in the theme root.
I don’t know what
dbx_post_advanced
hook is for, but you might be able to use it to do what you want.Add this code into your functions.php and modify it. The
post_name
check you may want to replace with checking the URL forpost-new.php
.