Skip Navigation

[Resuelto] Not all custom post types show up in search results

This support ticket is created hace 4 años, 2 meses. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Etiquetado: ,

This topic contains 2 respuestas, has 2 mensajes.

Last updated by AG hace 4 años, 2 meses.

Assisted by: Luo Yang.

Autor
Mensajes
#1502385

AG

I've created a staging copy of the site so that we can do anything to this and it won't matter to try to figure out what the problem is. If the staging copy prompts you for a username and password (aside from the wordpress admin login) the info is as follows:

username: topsafet_staging
password: 9t1T05vyDyDM#

I am trying to: make it so that all my results appear in my search results view I've set up for my speakers. For the most part I do see many of my speakers but the odd few do not show up in my search results nor when I search for them even though I've chosen to display all of my custom post type 'Speakers', ordering them by "Field - Speaker Name" ascending as a string.

Link to a page where the issue can be seen: hidden link

These are some of the speakers that have been added that do not show up in the search results page but have their own single pages created with the appropriate categories as well.

Lisa Lounsbury - hidden link (it's also very weird that this is one of the only pages not following the format as the other speakers, I don't believe I've done anything different with hers yet it doesn't keep the same formatting as the few speaker links below?)

Michelle Ray - hidden link

Jeff McKissack - hidden link

I expected to see: The above speakers (plus whoever else is missing on this page - hidden link when you either search in the respective categories or name search

Instead, I got: Nothing. Nothing shows up when you search for the speakers I've linked to above when you they should be popping up like the others do.

It also seems that the formatting I've done in my custom fields when adding speakers is being stripped out of the speaker single pages as well. This speaker hidden link had new lines and title everywhere in the editor but not when you preview the speaker front end page.

I also have a few other questions but I'm not sure if I should bombard you with them right now or figure this out, open another ticket or add to this one?

Thanks!

#1502863

Hello,

Thanks for the details, I can see the problem in your website.

Here are what I found, please check these:
1) Edit post view "Search and Results NEW"
hidden link
in section "Ordering". you are using option "Field - Speaker Name"
2) Edit the problem "Speaker" post:
hidden link
There isn't custom field "Speaker Name", it conducts the problem, Toolset Views/Blocks plugins are using WordPress WP_Query to query posts, see WP document:
https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
‘meta_value‘ – Note that a ‘meta_key=keyname‘ must also be present in the query
That means if you order the results by a custom fields, all posts should have that custom field.

In your case, you just need to change the to: order by post title, and test again.

#1509083

AG

It's just as easy as that. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.