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

Question: How to preview posts #43

Open
robwebdev opened this issue Dec 13, 2017 · 2 comments
Open

Question: How to preview posts #43

robwebdev opened this issue Dec 13, 2017 · 2 comments
Labels

Comments

@robwebdev
Copy link

Not an issue, rather I was wondering how others are handling previewing of posts whilst using this addon, or just the WP Rest API in general.

The problem I foresee is that we will have a site built in Ember that consumes the WP content via the API, but clicking on the preview button in the WP admin will take the user to an unstyled template served by WP. Are there any ways around this?

@oskarrough
Copy link
Owner

You could add some basic styling to the Wordpress theme. Just enough for the preview to render ok.

Alternatively, to get drafts via the API I believe you'd have to authenticate first. Then you could your preview route in Ember and hack Wordpress to use that URL for previews.

I'd also be interested in anyone have a good solution for this. Because the above is not really great.

@sheriffderek
Copy link

sheriffderek commented Dec 31, 2017

I just trim up the WP admin so that options like 'preview' are just not there. We can only expect so much as far as integration - unless you want to make a WP plugin that would adjust that 'view-post' button to open your live client based on slug etc. In my case, I'm just trying to get a free CMS. Setting up all the ACFs and things in a WP theme for preview is more than I want to maintain. I am however working out a way for my article styles to be built by ember-cli - and sent to the WP install to show the copy in site-styles.

The bigger question for me is how to have a staging / or unpublished area to view things before the whole world can. Our writers want to see their words on the page and to review them in context before they are live. I could have a preview route or something that populates anything that isn't 'published' I guess...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants