Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed Wordpress into Razor View #138

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

LORDofDOOM
Copy link

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 ;-)

…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 LORDofDOOM changed the title Razor view Embed Wordpress into Razor View 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