How can i filter the link given in "link to existing content".
As in the above image. I just want WSP BANNER TO BE SHOWN.
where WSP BANNER & CALENDAR are custom POST types
Any help will be appreciable.
Currently there are no ready filters available for this purpose. A ticket has been posted for the request.Lets hope we get one soon.
Instead of hardcoding your custom post types its better to create a filter hook and use it
Till then you can create your own filter.
Open includes/class-wp-editor.php and make folowing changes at line no 712
we just added a new filter instead of getting all the public post types
Then in your theme add following code to filter the internal link custom post type
Check the file
More, in the same file, line no. 689, the function
Hence, you have to live with it! ;)
if it's very very urgent, you may be want to edit class-wp-editor line 711 to
, otherwise leave AS IS
I wrote a plugin for that. You can download it here from the plugin repository.
Install it and then put this filter in your
This plugin also has the functionality to replace internal links with shortcodes. If you don't want to use this, deactivate it like this:
Full instructions can be found here: https://wordpress.org/plugins/b09-link-to-existing-content/faq/