Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Problem with custom post META

Tagged: , ,

Viewing 10 posts - 1 through 10 (of 17 total)
  • SPOT MEDIAS
    #207606

    Hi,

    I made a form to be able to search in META for a custom post with a select list.
    Some of the META I select give no result but if I make a search in the text field the result display the result I was supposed to find inside the meta.
    NB: I have installed Relevanssi to be able to search into the meta from the text search field.

    If it’s not clear (my english ain’t so good), here an example:

    Go to: https://clubgravelle.com/membres/

    Try to search into the list “Nom de l’entreprise” : A&C consulting
    You’ll get no result.
    Now search into “Nom du Membre” (plain text): Richomme
    As you can see the result contain “A&C consulting”.

    I was thinking that it can be a problem with the “&” but same thing with others without special characters like “ASCOTEPE” (but if you search with “Nom du Membre” you’ll find it).

    SPOT MEDIAS
    #207607
    This reply has been marked as private.
    Trevor Moderator
    #207617

    The problem with ASCOTEPE is that the field entry in the post also has a space at the end of it.

    Are they the only two with issues, as the ‘&’ may indeed be a problem.

    SPOT MEDIAS
    #207621

    Trevor,

    is there a way to strip the spaces at the end of the metas? Because it seems my client added space on some and this can be done in the future even I ask here not to add space.

    The “&” doesn’t work but the “?” yes. Is there a way to fix that ?

    Thank you.

    Trevor Moderator
    #207625

    You could add some validation using PHP in the child theme’s functions.php file hooked in to the WordPress save_post() function (so it runs when a post is saved and trims any spaces off), but you would need to code this yourself.

    Actually, I think ACF has a way to do this:

    https://stackoverflow.com/questions/31909099/remove-spaces-from-advanced-custom-field-data-on-save-using-act-save-post

    As to the ampersand, I will refer this to Ross, our plugin developer, for his input.

    SPOT MEDIAS
    #207632

    Thanks for the tips, I will try to find a way to strip spaces.
    Waiting for your return about the “&”.
    Thank you

    SPOT MEDIAS
    #207748

    Hi Trevor,

    Did you get an answer for this problem ?
    I need to publish my work asap.

    Thank you.

    Trevor Moderator
    #207750
    This reply has been marked as private.
    Ross Moderator
    #207829
    This reply has been marked as private.
    SPOT MEDIAS
    #207863

    Thank you for your help.
    I need to ask why to the dev who made the theme am using if that’s the cause of the problem.

Viewing 10 posts - 1 through 10 (of 17 total)

The forum ‘Search & Filter Pro’ is closed to new topics and replies.