Support Forums

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

Forums Forums Search & Filter Pro Search for Post ID

Viewing 4 posts - 1 through 4 (of 4 total)
  • Miriam Brückner
    #245971

    Hi there – I have a very rare use case one more time. I want to be able to search by some kind of special relation. I think I have to explain this a little further:
    I sell digital crafting templates – and I recommend the material I am using for my crafts.
    The material is displayed on a kind of overview site where I use SFP to display and filter my recommendations.
    No I am searching for a way to add a link to my single product page (woocommerce shop), that brings my customer to the material overview, where he only sees the relevant (filtered) material recommendations for the specific project.
    I think I can handle this by using ACF (raltional) to add the “linked material” information to each single product. But how can I than use this information to trigger the filters in the material overview!?

    First idea: I can tell Relevansii to index post ids and then use the post id (gathered via the acf) to display the specific material recommendations on material overview. Only ugly thing using this solution: The ids will be shown in the search-input-field. I think that might look quite weird or confusing for my customers.
    Is there another solution I am overseeing?
    Do you have a hint for me?
    Maybe I could somehow use a hidden search field?
    Post meta?
    But post id is not part of post meta I think…

    Any help would be appreciated <3

    Trevor Moderator
    #246022

    Are you needing to pass the Post ID to the next page, and then for that page to be able to use that Post ID?

    Would you, through your own PHP code, be able to append to the link that the use clicks the required Post ID, as a post meta query, like this:

    http://mysite.com/my-overview-page-slug/?_sfm_post_id_field=1234

    Would that work for you?

    You would need a custom field in each post that also has the Post ID, and use some code in your child theme functions.php file to autosave that data each time the post is saved.

    you could make a form that has that post_id_field in the Form UI, and uses the custom display method. Then, in the template, you could use that form as a w_query argument to pre-filter the content.

    Miriam Brückner
    #246543

    Hi Trevor!

    Thanks for pointing me in this direction! I love your plugin and all your knowledge and support!
    I was able to make it work 🙂

    Best wishes
    Miriam

    Trevor Moderator
    #246548

    Thanks for getting back to me. I will close this thread for now.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Search for Post ID’ is closed to new replies.