Comments (26)
So i figured it out, i had the wordpress installation in a subdirectory and it messed up not only the api routing ( had to change API_BASE_NAME ) and it messed up the other routing. Just reinstalled it in the main htdocs
directory for mamp and everything appears to be working fine now.
from vuejs-wordpress-theme-starter.
Thanks so much @joshbedo for tracking that down. I should note in the README that this project only works for root-level WP installs.
from vuejs-wordpress-theme-starter.
Hi, @robwelan. How are your permanent links? If you are using de WordPress default, change to any other permalink.
from vuejs-wordpress-theme-starter.
I've cycled through all permalink options except for custom. No change unfortunately. In case this helps, this is the html that is rendered between the header and footer sections:
<div class="page-content-wrapper"><!----></div>
from vuejs-wordpress-theme-starter.
I've worked out that adding '/development-vue' to my 'base' route (line 19 in index.js in the router folder) helps, as well as making sure 'plain' is not the chosen permalink. I've created a helper file to get window.location.pathname
and I have added the result to router/index.js (modifying 'base' value) and also app.js modifying API_BASE_PATH). Working OK on MAMP.
from vuejs-wordpress-theme-starter.
So it worked? 🤔
from vuejs-wordpress-theme-starter.
Yes, with the change I've described (adding window.location.pathname if it does not equal to '' on the router/index.js and the app.js files)
from vuejs-wordpress-theme-starter.
Close issue, please 😄
from vuejs-wordpress-theme-starter.
Thanks so much @raisiqueira for helping out! +1 to awesomeness for you!
from vuejs-wordpress-theme-starter.
Hello, I'm trying to use the starter theme but i'm not able to render the body either.
Specifically, When I open the example Home page, the lists of pages and posts are not rendering on the page.
I tried making the changes as stated above, but the list of posts is still not rendering. I am able to access the api via browser so I'm not sure what is going on.
Thank you for making the starter theme and I hope that you'll be able to help me!
from vuejs-wordpress-theme-starter.
from vuejs-wordpress-theme-starter.
No console errors.
from vuejs-wordpress-theme-starter.
from vuejs-wordpress-theme-starter.
There is no 404 at all.
from vuejs-wordpress-theme-starter.
from vuejs-wordpress-theme-starter.
I don't see the posts requests on the list at all.
I did another clean installation of the theme files to ensure that I didn't make any changes. Attached is a screenshot of the network requests.
from vuejs-wordpress-theme-starter.
from vuejs-wordpress-theme-starter.
@wester97 I uploaded the wrong attachment and changed it on the previous comment, am just now realizing that since you're responding via email that change did not get to you. Here is the correct attachment:
Thank you for the help.
from vuejs-wordpress-theme-starter.
Hmm, it seems that your requests for pages
and posts
aren't actually fired.
Do you see the placeholders for these sections on the homepage? For example: Home.vue loads pages-widget
which ultimately should load the results of getPages
into the data store, and thus into the view. You might have to trace that flow.
from vuejs-wordpress-theme-starter.
Hmm, please pull master
and try again.
from vuejs-wordpress-theme-starter.
It works perfectly now!
Thank you.
from vuejs-wordpress-theme-starter.
I've worked out that adding '/development-vue' to my 'base' route (line 19 in index.js in the router folder) helps, as well as making sure 'plain' is not the chosen permalink. I've created a helper file to get
window.location.pathname
and I have added the result to router/index.js (modifying 'base' value) and also app.js modifying API_BASE_PATH). Working OK on MAMP.
I am having the same issue while trying to load pages. All pages are blank and only shows
<div class="page-content-wrapper"><!----></div>.
I have tried to follow the solution attached but I did not understand which files need to be changed.
@robwelan Kindly assist me with the steps guide on how to solve the issue.
from vuejs-wordpress-theme-starter.
Thank you @EvanAgee for reopening the issue.
Did you manage to get a solution on the issue. I have tried everything on my side and I did not manage to solve it. All route-view are rendering an empty div as shown below.
<div class="page-content-wrapper"><!----></div>
I will highly appreciate for your assistance.
from vuejs-wordpress-theme-starter.
Just downloaded the project and also having the same problem. I checked the network request and the API calls are returning the correct data and look fine but for some reason the body isn't rendering for posts/pages or home. I tried adding debugger
in a few of the lifecycle methods but it wasn't getting hit not sure whats going on.
from vuejs-wordpress-theme-starter.
@EvanAgee no problem, yeah it would be cool if we could use subdirectories not sure what would be involved to make that happen.
from vuejs-wordpress-theme-starter.
I've just released an updated version of the project that will address many of these issues. Please note that the paths of the JS and CSS have changed so you may need to update your project. #48
from vuejs-wordpress-theme-starter.
Related Issues (20)
- Where does /src/api/index.js get included from? HOT 2
- Do we have an 404 page? HOT 3
- Off topic: use separate environment for the actual theme
- State error and can't connect to api HOT 10
- Best Way to Add Reactive Components to Posts / Pages?
- Font loading HOT 4
- problem when running npm run watch HOT 10
- Custom SASS file loading as assets?
- UglifyJS is still present?
- Deprecated ExtractTextWebpackPlugin blocking upgrades (Tailwind 2, PostCSS) HOT 1
- No content displaying HOT 3
- Error in posts and header nav HOT 3
- TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator)) HOT 5
- WordPress and VueJS routing problem HOT 2
- Shortcodes not working ? HOT 4
- ERROR in ./src/app.js HOT 2
- how add new posttype
- npm ERR! missing script: build HOT 1
- Still actively maintained? HOT 2
- Vue 3, Pinia
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vuejs-wordpress-theme-starter.