Skip to content

Conversation

LORDofDOOM
Copy link

@LORDofDOOM LORDofDOOM commented Mar 26, 2023

I've added options to embed wordpress into razor/cshtml view to e.g. show wordpress blogs into a AspNetCore Application.

I've added the function to WpResponseCaching (suits my use case best) to add wordpress context to the razor view, Razor view name is currently hardcoded ("/Pages/Wordpress.cshtml"), for a clean embedding you want to modify the theme (Header sections) to make sure it dont overwrite the default razor css (in default bootstrap). If you're logged in into Wordpress (admin) it skips the Razor implementation to make sure we dont break Wordpress Header.

Please take a look, I'm unsure if this is the best possible option to get this into place but it works - It could be some kind of hacky code ;-)

First commit is only default MS Razor template, sorry for the tabs, you did use spaces, so in my commit it seems it changed from spaces to tabs -> Please consider to use a .editorconfig -> I'll correct this if needed :-)

c036fca

…he WpResponseCaching (suits my use case best) to add wordpress context to the razor view, Razor view name is currently hardcoded (/Pages/Wordpress.cshtml), for a clean embedding you want to modify the theme to make sure it dont overwrite the default razor css (in default bootstrap)
@LORDofDOOM
Copy link
Author

Create proper PR without whitespace commits #138

@LORDofDOOM LORDofDOOM closed this Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant