SOLVED: Link internal page/post to cpt page with "exclude from search"

Hello bricks users,

I’m having trouble linking to a custom post type page using the link elements internal page/post function. Is this possible? If so, could someone explain how to do it? I haven’t been able to find anything about it on the forum, so I’m wondering if it’s a simple fix I’m just missing, or maybe it’s not possible at all.

Thanks in advance!

1 Like

I have the same issue!
No solution for this since months?


@thomas
@timmse

Just disable the option “Exclude from search” for your CPT and it should work.

1 Like

This looks like a bug to me indeed. However, it’s not related to ACF, Meta Box or any other specific plugin.

The search query in the builder uses a post_type argument of any. However, this query won’t find posts from post types which were registered with exclude_from_search being true (see WP_Query – Class | Developer.WordPress.org).

@charaf, @itchycode Maybe something that can be fixed? Excluding post types from search doesn’t mean they shouldn’t be searchable as link targets within Bricks, should they?

Best,

André

Thank you to everybody.

Here is the solution to this, to easy understand:

Hi guys,
We agree that this should still be possible within the builder and have created an improvement task for this purpose.

1 Like

I am having a similar issue with Woo Products and populating the single product template with any product?

@timmse I appear to only be able to select pages and searching returns nothing outside of pages either.

Now this did work. as i was able to select a specific product before but in trying to change the previewed product i can no longer select or search for any product

If your “product” post type is a custom post type and not the WooCommerce “product” post type, it seems to be the same problem. If it is the WooCommerce “product” post type, I cannot reproduce the problem, as it is searchable by default.

Please create a separate report in the bugs category including details about your setup and steps on how we can reproduce the problem.

Ill send a support ticket with access. This is not a custom post type. it is woo product post type

EDIT

@timmse Found the problem to be relevanssi plugin and a particular setting enabled “admin search” was causing the issue.

Once the Admin Search Setting in relevanssi was disabled the issue was resolved and i could search and see all products and posts etc.

We’ve addressed this in Bricks 2.3.6, now available as a one-click update in your WordPress Dashboard.

Please read the changelog entry before updating, and let us know if you experience any issues.