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
if it's very very urgent, you may be want to edit class-wp-editor line 711 to
, otherwise leave AS IS
Check the file
More, in the same file, line no. 689, the function
Hence, you have to live with it! ;)
I wrote a plugin for that. It is not in the plugins repository yet, you can download it here:
Install it and then put this filter in your functions.php:
This plugin also has the functionality to replace internal links with shortcodes. If you don't want to use this, deactivate it like this:
Hope this will be useful for you!