Building with Headless WordPress in a Block-based World

Поделиться
HTML-код
  • Опубликовано: 28 окт 2024

Комментарии • 18

  • @NewtonAdams-i9i
    @NewtonAdams-i9i 9 месяцев назад

    Hey I'm having trouble with the columns and column block not passing through the innerBlock data. I see it done with just passing the children but there's nothing going through

  • @ahmadkhaled7497
    @ahmadkhaled7497 2 месяца назад

    Can I use vue js instead of React/Next?
    I know the wp block library is react-based, but I can use any external tailwind library and follow the same tutorial?
    In theory can this work?

    • @sludgebucket3042
      @sludgebucket3042 Месяц назад

      Yeah you should be able to use the graphql data with any framework, but tailwind is a CSS library, this will probably require a Javascript-based framework to make any use of the data

  • @odd_plebeian
    @odd_plebeian Год назад +3

    Can this be used outside of faust at all? I dont want to use faust to mimic the WordPress structure with single and singular. I want to use the app router with app -> [slug] -> page.tsx and there I will have a query for a page with conditionals if needed.

    • @WPEngineBuilders
      @WPEngineBuilders  Год назад +1

      In theory, since the block viewer package is just React, you could use it in any React-based framework but YMMV. And FWIW you don't have to use the template hierarchy, that's an opt-in convention, we have some examples for app router support here: github.com/wpengine/faustjs/tree/canary/examples/next/app-router

    • @odd_plebeian
      @odd_plebeian Год назад

      @@WPEngineBuilders Thank you for that information, I was struggling to get nested page routing with next13 and the app router. I am checking out the template hierarchy option now and the routing works, I just wish that was with the app router

    • @odd_plebeian
      @odd_plebeian Год назад

      ​@@WPEngineBuilders I have been playing around with the example code and ran in to the same issue I was having before, which are nested pages. I understand that the branch is experimental but I was wondering where I can add a bug/request or start a discussion about the issue. Just to clarify here that the issue is this. Your client has an about us Page with several sub pages.
      About Us
      --- Contact
      --- Privacy
      --- FAQ
      so I would expect the url to be //site-name/contact/sub-page

    • @WPEngineBuilders
      @WPEngineBuilders  Год назад

      @@odd_plebeian It seems like that would be possible using nested routes: nextjs.org/docs/app/building-your-application/routing#nested-routes

    • @WPEngineBuilders
      @WPEngineBuilders  Год назад

      @@odd_plebeian If you don't want to specify each route individually, you could use this catch-all route. That is basically what the template hierarchy piece does: nextjs.org/docs/app/building-your-application/routing/dynamic-routes#catch-all-segments

  • @lindsayaiello501
    @lindsayaiello501 5 месяцев назад

    Where do i find the WPGraphQL content blocks extension?

    • @WPEngineBuilders
      @WPEngineBuilders  5 месяцев назад

      Hi there - you can find that here: faustjs.org/tutorial/get-started-with-wp-graphql-content-blocks
      Also, if you're not already in our Headless WP Discord we would love to have you 💜 discord.gg/headless-wordpress-836253505944813629

    • @lindsayaiello501
      @lindsayaiello501 5 месяцев назад

      @@WPEngineBuilders Thanks! Do you have to use faust to use that plugin?

    • @WPEngineBuilders
      @WPEngineBuilders  5 месяцев назад

      @@lindsayaiello501 Hi there, great question. No, this plugin does not require Faust.
      Now, Faust makes it easier because the queries are set already. However, you can use any framework with this plugin since what it primarily does is give block data to a server-side registry so it shows up in GraphQL.
      Let us know if you have any other questions!
      - Sam ✨ Community Manager

  • @visualmodo
    @visualmodo Год назад

    Very good video! =DD