How to make custom post type appear in WordPress WYSIWYG link selector

I created a custom post type on my WordPress site but I’m having trouble linking to it. When I try to add links through the visual editor, I can only see regular posts and pages in the link options. My custom post type entries don’t show up in the “Link to existing content” dropdown menu.

I’ve registered the post type properly and it works fine otherwise. I can view the posts on the frontend and edit them in the admin. But when I’m writing content and want to link to one of these custom posts using the WYSIWYG editor, they’re just not there.

Is there a setting I need to enable or some code I need to add to make these custom posts available in the link picker? I’d really like my content editors to be able to easily link to these posts without having to copy and paste URLs manually.

i had the same problem! adding ‘public’ => true and ‘show_in_nav_menus’ => true in the register_post_type args worked for me. it makes them appear in the link selector. hope this helps!

Add ‘show_in_admin_bar’ => true to your post type args. WP sometimes needs multiple visibility flags before it’ll show custom posts everywhere. Had the same problem - posts showed in admin but not the link picker. That parameter fixed it.

The Problem:

You’re encountering difficulties making custom post types appear in WordPress’s visual editor’s link selection dropdown. Your custom post types are registered correctly, viewable on the frontend and editable in the admin, yet they don’t show up when creating links within the WYSIWYG editor, forcing manual URL entry. This impacts content editors’ workflow and productivity.

:thinking: Understanding the “Why” (The Root Cause):

The WordPress link picker relies on several factors to display custom post types. Simply registering a post type isn’t enough; WordPress needs explicit signals indicating its visibility and searchability within the admin interface. Missing these crucial parameters means the system doesn’t recognize your custom post types as linkable content. Furthermore, relying on manual code adjustments for each custom post type creates a maintenance burden. Theme or plugin updates, or even core WordPress changes, can easily break your customized code, requiring constant intervention and potentially breaking functionality.

:gear: Step-by-Step Guide:

Instead of manually modifying WordPress core functions, which is prone to errors and breakage with future updates, let’s automate this process for long-term maintainability and resilience. This approach ensures your custom post types remain consistently visible in the link picker regardless of WordPress updates, theme changes, or plugin conflicts. Here’s how you can approach it with automation (the specific implementation details will depend on the chosen automation tool; the concept remains the same):

  1. Implement an Automated Workflow: Set up an automated workflow (e.g., using a tool like Zapier, IFTTT, or a custom-built solution) that monitors your custom post types. This workflow acts as an active, continuous check on your WordPress configuration.

  2. Configure the Workflow to Monitor Custom Post Type Registration: The core of the workflow is the monitoring aspect. The system needs to detect when new custom post types are added or when changes occur in their registration arguments. This is usually achieved by hooking into WordPress’s events and actions.

  3. Trigger Action to Apply Necessary Settings: When a new custom post type is added or existing ones are modified, the workflow should automatically apply the necessary parameters to ensure visibility in the link picker. These parameters, added to the register_post_type() function, include:

    • 'public' => true: Makes the post type publicly accessible.
    • 'show_in_nav_menus' => true: Allows the post type to appear in navigation menus.
    • 'show_ui' => true: Makes the post type visible in the admin interface.
    • 'publicly_queryable' => true: Ensures the post type shows up in search results and the link picker.
    • 'has_archive' => true (optional but recommended): Allows the creation of archive pages for this post type. This often resolves this kind of linking problem, even if you don’t intend to have archive pages.
  4. Automatic Permalink Flushing: After applying these changes, the workflow should automatically flush the rewrite rules using flush_rewrite_rules(). This ensures that WordPress regenerates its internal URL structure, reflecting the changes you’ve made to the custom post types.

  5. Continuous Monitoring: The automation workflow should run continuously, monitoring for changes and making adjustments as needed. This approach provides a robust, self-correcting solution to prevent the issue from reoccurring due to updates or conflicts.

:mag: Common Pitfalls & What to Check Next:

  • Caching Plugins: If the changes don’t take effect immediately, try clearing your WordPress cache. Caching plugins can sometimes prevent updates to the admin interface from being reflected instantly.

  • Theme Conflicts: In rare cases, theme styles might inadvertently interfere with the link picker’s behavior. Try temporarily switching to a default theme to isolate whether a theme conflict is at play.

  • Plugin Conflicts: Deactivate plugins that might interact with the post type registration or the admin interface. This will help in determining if a plugin conflict is interfering.

:speech_balloon: Still running into issues? Share your (sanitized) config files, the exact command you ran, and any other relevant details. The community is here to help!

Sounds like your post type’s rewrite settings are the culprit. I ran into this exact issue last month - adding ‘has_archive’ => true to your post type registration fixed it for me. WordPress needs this parameter to index custom posts properly for the link selector search. You don’t actually need archive pages, but this setting tells WordPress the posts should show up in the editor interface. Update your register_post_type function, then flush permalinks by hitting Settings > Permalinks and clicking Save Changes. That’ll refresh WordPress’s URL structure and your custom posts should appear in the link picker right away.

Most people try fixing this with individual code tweaks but miss the bigger picture. WordPress link selector visibility needs multiple parameters working together, not just one setting.

I’ve dealt with this across dozens of sites - manual code fixes create maintenance headaches. Every theme update or plugin conflict breaks your custom parameters.

Better approach: automate the entire custom post type configuration. Set up a workflow that monitors your post types and automatically applies the required settings - public visibility, menu inclusion, UI display, and search indexing.

The automation handles edge cases too. When plugins override your settings or WordPress updates change defaults, it keeps your custom posts consistently visible in the link picker without touching code.

Your content team gets reliable linking, and you avoid constant troubleshooting when things break.

Double-check that your register_post_type function has ‘show_ui’ => true in there. I hit this same problem last year on a client site - turns out I’d missed that argument. WordPress can be weird about it - even with ‘public’ set to true, it sometimes won’t show custom post types in the editor without that explicit show_ui setting. Also, if you’re running caching plugins, clear them after making changes. I’ve seen cached admin pages not pick up the new post type settings right away.

check if u’ve set ‘publicly_queryable’ => true in your post type registration. without it, wp won’t show them in the search results or link picker. also, make sure ‘exclude_from_search’ isn’t set to true by accident.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.