Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

The theme does not work in the Bedrock project #112

Closed
Sergey98Am opened this issue May 23, 2024 · 6 comments
Closed

The theme does not work in the Bedrock project #112

Sergey98Am opened this issue May 23, 2024 · 6 comments

Comments

@Sergey98Am
Copy link

I have a WordPress Bedrock project, but this theme does not work there. In another WordPress project without Bedrock, it is working.

image (6)

I get these style.css and script.min.js 404 errors.

Screenshot from 2024-05-23 18-32-44

Is there a way to use this theme in the Bedrock project?

@gregsullivan
Copy link
Owner

Hi Sergey—Thanks for posting this!

I've never used Bedrock before, so I can't confirm one way or another. I don't remember hearing from anyone saying they were using it with _tw.

Can you confirm that you've run npm run dev (or watch or prod)? I just want to confirm the script.min.js and style.css files have definitely been created.

Barring that, I would need to set up Bedrock and see what I found during that process. I won't have time to do that in the immediate future, but I can keep this open and make an attempt when possible!

@Sergey98Am
Copy link
Author

@gregsullivan. Yes, I have run these commands, there are script.min.js and style.css files

Screenshot from 2024-05-24 14-30-01

@gregsullivan
Copy link
Owner

Great, thank you! I'll try to get Bedrock set up locally, and I'll note anything I find here.

@Sergey98Am
Copy link
Author

Thanks in advance

@kyle-cyberprairie
Copy link

@Sergey98Am is this because of the file structure? I am using _tw with Bedrock and it is working for me. I had to set a symlink for my theme, so /my-theme exists on the project root, which web/app/themes/my-theme points to.

@gregsullivan
Copy link
Owner

I'm revisiting this tonight, and I believe agreeing with this answer is as confident as I can be in terms of the best approach:

@Sergey98Am is this because of the file structure? I am using _tw with Bedrock and it is working for me. I had to set a symlink for my theme, so /my-theme exists on the project root, which web/app/themes/my-theme points to.

A couple of points:

  • My understanding is that Bedrock users are likely to be deploying the same structure from development to production. With that being the case, keeping the theme repository from _tw in the project root and symlinking ./my-theme/theme/ to ./web/app/themes/my-theme would be preferable in that you're only keeping the deployable portion of _tw in the public folder.
  • I continue not to have personal experience with Bedrock, so I can't state definitively that symlinking within a Bedrock project isn't discouraged for other reasons. But I don't foresee any issues with that approach, and I still use symlinking without issue on local development environments for some if the _tw-based sites that I build.

I'm going to convert this to a discussion, and I'd be happy to revisit this further if anyone has questions about or issues with this in the future.

Repository owner locked and limited conversation to collaborators Mar 9, 2025
@gregsullivan gregsullivan converted this issue into discussion #175 Mar 9, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants