Forum Replies Created
-
AuthorPosts
-
GreyvolfMember
Thank you, Victor! Your solution is better since I can have different templates for "My Work" and "My Hobbies". With my solution above I'll be stuck with the same template as the "Portfolio". I'll just have to figure out the appropriate query to show them...
GreyvolfMemberOk, so I figured one way to do it, I don't know if it's the best way but I'm going to elaborate it in case someone else encounters the same problem.
The following is the order I created the whole CPT scenario:
1. Created a CPT with hierarchical option set to true.
2. Created a few Custom Fields.
3. Added 3 CPT to have something to work with - "Portfolio", "My Work", "My Hobbies"
4. Added a custom taxonomy - "parent-page" and assigned that to the "Portfolio" CPT. The others are child pages to "Portfolio". You set the parent in the Page Attributes.
5. Created a query that only shows on only those CPT that have the "parent-page" category. (using page-portfolio.php template). So at this stage you should only see the "Portfolio" displayed. "My work" and "My Hobbies" are hidden.
6. Then in the Custom fields you insert a link and to the href the path should be "/my-work" or "/my-hobbies"That did it.
GreyvolfMemberFirst of all, thank you, Victor, for your prompt reply, appreciate it. I wonder what's the worst that could happen if I don't add the support you mentioned? I wouldn't want my author to be confused by those fields. Secondly to make my issue more clearly understood I'm going to give a quick example.
Before that, I want to mention that I know very well HTML CSS and JS, so I don't have a problem with creating the mark-up, styles and interaction. Ok, here goes:
Let's say I have a portfolio CPT and there I have 2 links - "My Work" and "My hobbies". Now, where do I create those additional pages/posts and how do I link them to my CPT? Should I create another template(s) in order to show them? Another CPT? This is the point where I'm stuck.
So far I have created the page-portfolio.php template where I show all my portfolio CPT and a single-portfolio.php template where I have the code on how the CPT should look like.
Thank you in advance!
-
AuthorPosts