How Can I Exclude Attachments from the Link Search Field in the WordPress Editor

  • Unknown's avatar

    When I try to add an internal link in a blog post, the search field shows media attachments (like .webp files) before actual blog posts. This makes it harder to find and select the right post.

    Is there a way to filter the results so that only published blog posts appear in the search field—excluding media files and attachments?

    I’m using the default WordPress block editor and don’t have any link-related plugins currently installed.

    Any ideas or workarounds would be appreciated!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi,

    When I try to add an internal link in a blog post, the search field shows media attachments (like .webp files) before actual blog posts. This makes it harder to find and select the right post.

    Perhaps I’m misunderstanding what you’re trying to do. If your goal is to add links, using a word or phrase that might appear in various posts, then to locate which posts this word or phrase appears in I would go to All Posts, the link to which is the first item under Posts in the left sidebar of the image in your original post here. A search at All Posts will only list posts in the search results.

    Secondly, if you’re attempting to find a word or phrase in a single post to make a link with, then wouldn’t you use a browser word finder to locate that word or phrase? That’s what I would do. Let me know, please, if I’ve misunderstood what you’ve described above and what your objective is.

    I’d added a modlook tag to call for staff attention to the topic before I decide to make a response. Staff will respond here.

  • Hi @peterss365!

    Thanks for posting your question here. Keep in mind that this forum is mostly for users with sites hosted at WordPress.com, whereas your site is hosted elsewhere when I check here: https://wordpress.com/site-profiler/duffelbagspouse.com.

    You can quickly migrate your site to WordPress.com: https://wordpress.com/setup/hosted-site-migration/

    That said, the behavior you describe is expected in the block editor (aka Gutenberg) and there are no public-facing settings to modify it as far as I know. You can search for any existing feature requests or create one here: https://github.com/WordPress/gutenberg/issues

    Also, you can post your request for help on https://wordpress.org/support/forums/ to see if anyone can suggest workarounds or plugins for your situation.

    I hope that’s helpful and points you in the right direction.

  • The topic ‘How Can I Exclude Attachments from the Link Search Field in the WordPress Editor’ is closed to new replies.