Replies: 4 comments 1 reply
-
Hey @rshov, thank you for the proposal! We agree that Faust should have the ability to be a companion to traditional WordPress, and that's something we are working towards. In the spirit of this proposal, the WordPress plugin currently provides a filter, faustwp_exclude_from_public_redirect, allowing you to exclude specific routes from redirecting when the "Enable public route redirects" option is active. |
Beta Was this translation helpful? Give feedback.
-
This snippet should work for now. /**
* Use the active theme's menu locations.
*/
add_filter( 'faustwp_get_setting', function( $value, $name ) {
if ( 'menu_locations' !== $name ) {
return $value;
}
$locations = array_flip( get_nav_menu_locations() );
return implode( ',', $locations );
}, 2, 10); |
Beta Was this translation helpful? Give feedback.
-
I've moved this to a discussion threat. |
Beta Was this translation helpful? Give feedback.
-
To chime in, we have the exact same need. We have an existing site that's a few years old and we're building a series of Nuxt microsites which will get their data from WP via WPgraphQL. The existing site will remain a "traditional" Wordpress site, and there are no plans to change that. So we definitely need a way to offer headless previews for just a couple custom post types, without messing up existing functionality. |
Beta Was this translation helpful? Give feedback.
-
I have a use case that may not be what Faust is intended for, but I think will be useful to a number of people. We are not ready to fully replace our WordPress site with a headless site, but would like to create one or more Faust apps to complement the existing WordPress site. The apps would live at subdomains of the main site, and are just for custom apps that we need, and are easier to implement in Next.js using the authentication features that Faust provides. This might eventually lead to going fully headless, but I think this would be a stepping stone for us.
The problem that we have run into though is mainly with the Menu Locations, where Faust basically takes over the Menu Locations from the existing site and replacing them with the Faust setting. When using the Faust plugin on the site, the menus went missing. We found we could work around this by commenting out this line in the plugin code:
But it seems like this would be nice to have as an option in the Faust settings. Something like this:
There may be other potential issues like this, but the Menus is all that I've run into so far.
I imagine there might be other people that want to continue using their existing WordPress site as they transition to a headless Faust site. I think that would be a good scenario to support if possible.
Thank you for the awesome work on this! This project is going to be incredibly useful.
Beta Was this translation helpful? Give feedback.
All reactions