Join the Webstudio community

Updated 5 days ago

Building a Dynamic Blog Page in Webstudio

hello everyoneI'm building a dynamic blog page in Webstudio. The blog posts are fetched from a WordPress backend using GraphQL (via WPGraphQL). All content is dynamic and loads using Webstudio's GraphQL integration.

  1. I want to allow users to search blog posts using a simple search input (Server-side rendering only, )
  1. I need a language switcher button Works without external translation APIs (like Google Translate) without dublicate page
Attachment
media.png
O
a
16 comments
so what's the question?
how can i implement this two functionality
i have watched all this video but not found my solution,
my query is how to implement search functionality in webstudio, and language translator button to change the page language
this can help with understanding filters/search https://www.youtube.com/watch?v=oAaGTsHt-aE
language translator - you seem to want to translate on the client using some API, not serverside, correct?
I personally haven't done this, but I bet there are several tools doing this via scripts and api calls
I have used GraphQL to fetch all WordPress posts on my page by following this video:
๐Ÿ‘‰ https://www.youtube.com/watch?v=TkiUInblEPo&list=PL4vVqpngzeT4sDlanyPe99dYl8BgUYCac&index=60&t=8s

Now, I want to add search functionality to filter the posts.
I reviewed the reference video here:
๐Ÿ‘‰ https://www.youtube.com/watch?v=oAaGTsHt-aE
But that approach is different from my case.

Please guide me on how to implement search functionality with GraphQL and WordPress.
I've already searched YouTube, Google, and other platforms but couldnโ€™t find the correct reference for my specific setup.
I can't give you specific thing that you need to do without seeing anything. Generally it works exactly the same way, you only need to pass the search string to your API differently, the way your graphql service requires it.
I recommend searching any documents/videos on how to do search with your graphql api, then doing this in a graphql playground and once that works, adding that query to webstudio and passing the user search there just like we showed in the videos.
once you have tried all that, if you share your graphql playground with your api connected that works and it still doesn't work in webstudio, I can have a look at the project if you provide a shared link to check for mistakes in how you entered the gql query in webstudio
can you please give me reference for how to implement language translator that doesn't need to use external APIs
You will need some service that can translate on the client. I have no reference, maybe someone else has
okay thankyou for your support
Add a reply
Sign up and join the conversation on Discord