wpdotnet-sdk icon indicating copy to clipboard operation
wpdotnet-sdk copied to clipboard

[Feature] Any option to output wordpress into a Razor page ?

Open LORDofDOOM opened this issue 2 years ago • 4 comments

I want to ask if there is any option to render Wordpress in razor as "@RenderBody()". This would be pretty helpful and a great usecase for peachpie to create e.g. the blog pages in WP but preserve the layout for everything else (or mix up functionality)

I include Wordpress with specified HomeUrl/SiteUrl directly in my aspnetcore application and use SQLite as database, this works fine but I need the option to "render" wordpress directly into a Razor Page (with the default _Layout.cshtml).

I checked your sample code to integrate php into a razor view (https://github.com/iolevel/peachpie-samples/tree/master/mvc/render-php-within-razor) but the wordpress routes seems to get rewritten though the middleware so I'm unsure if this could work that way.

Thank you for the awesome work :-)

LORDofDOOM avatar Feb 09 '23 11:02 LORDofDOOM