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

Change body class on page change (WordPress) #42

Closed
imbeard opened this issue Nov 16, 2018 · 3 comments
Closed

Change body class on page change (WordPress) #42

imbeard opened this issue Nov 16, 2018 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@imbeard
Copy link

imbeard commented Nov 16, 2018

Hi,
first of all the library looks amazing!
I'm facing some issues updating body classes (standard WP behavior) after a page transition end.

Any hints for pointing me in the right direction?

thanks!

@ThaoD5
Copy link
Contributor

ThaoD5 commented Nov 16, 2018

Hello @imbeard, on our last production, we proceeded this way :

window.H.on('NAVIGATE_IN', (to) => {
  document.body.classList = to.page.body.classList
});

Have a good day

@ThaoD5 ThaoD5 self-assigned this Nov 16, 2018
@imbeard
Copy link
Author

imbeard commented Nov 16, 2018

@ThaoD5 thanks a lot! will try it

@imbeard imbeard closed this as completed Nov 16, 2018
@Brendan1983
Copy link

@imbeard and @ThaoD5 - I've been trying to include Highway in my Wordpress projects for a little bit, but I can't seem to make any headway. Do you use a particular starter theme or framework?

I work off of _s theme and compile our SCSS/JS with Codekit, but Highway might finally push me into using a more modern Workpress theme workflow.

I just completed a React Udacity course, but would really love a lightweight alternative to the headless CMS route. I would be open to paying a consulting fee for your time if either of you would be open to showing me the ropes of how you build your WP themes with Highway. Just throwing it out there if anyone's interested!

@Anthodpnt Anthodpnt added the question Further information is requested label Dec 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants