-
Notifications
You must be signed in to change notification settings - Fork 111
Custom post type routing #15
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
Comments
This is how I have done it for CPT single posts:
Also create a single-movie.php file in the root |
Thank you @shubhra14 for your response. I have created custom post type manually through code and copy single.vue file for SingleFotografen.vue in routes.js I have added following code: and Still it shows error. I don't understand what I miss. Please see the screenshot for error and let me know. I have get JSON data for post type. Hope you have some solution for this. Hope to here from your end soon. |
@shubhra14 I forgot to create single-fotografen.php. I have created single-forografen.php but the issue is it's not working with .vue file. It load php single-fotografen.php file so it refresh the page everyttime. I want to make it work with .vue file without refresh. Do let me know what solution you have for this. Thank you in advance. :) |
You should install Vue devtools browser extension and have a look if routing is working as expected. |
@shubhra14 I have already installed this but routing is not correct and I don't know at which palce I still need to do changes. Please let me know if you have any clue aboue this. |
@shubhra14 Single page for custom post type is working now. But I have issue with custom post type listing page (Custom post type Archive page). Do you know how to manage this? |
Duplicate Posts.vue. routes.js
Create the CPT php file as well. |
@shubhra14 I am not able to find Posts.vue file. Could you please check and share this file? Thanks you so much for your help. :) |
@shubhra14 Please see attached images. I am able to get data but only issue with the display result. I have created archive.php file for the post type as well. |
@shubhra14 Have you looked into these screenshots? I realy appreciate your help. |
The computed property is undefined. Might be some issue in Fotografen.vue |
@shubhra14 Thank you so much for the help. :) |
Did you manage to solve the issue? I bumped on same today, and actually the error shows you that you are missing something related to the RADL functions. Basically you did everything right except to edit the Example: if 'movie' is the custom post type:
All the steps are explained here for custom post type: |
Hello,
I am using this vue- wordpress theme, I have added custom post type but I am facing issue with routing. Could you show me where I can change for routing for custom post type.
I have tried changing in routes.js and path.js but it's not working for me. So please help me with this.
Expecting reply from your end ASAP.
Thank you in Advance.
The text was updated successfully, but these errors were encountered: