-
AuthorPosts
-
October 10, 2014 at 10:04 pm #334091
Hello, I noticed that I am unable to create parents / child portfolio items as I am able to do with other regular pages within wordpress.
How could I go about being able to create that kind of setup on the portfolio custom post type?
Thanks.
October 13, 2014 at 1:14 pm #334850Hi momon!
Please go to Portfolio Items > Portfolio Categories and add child categories to your parent categories
Regards,
YigitOctober 13, 2014 at 4:48 pm #335022Looks like my question was not clear.
I am not looking to create child categories, I know how to do that. I am looking to create tired documents (similar to how pages work).
So lets say I have a portfolio that hosts all picture of today, but today I took pictures of plants, ants, the zoo and the park. What I want to do is create a portfolio entry for “Today” and within it children of “Today” with my classification.
-> Today
-> The Park
-> The Zoo
-> Plants
-> AntsEtc
I understand your suggestion of using categories but these categories are specific to a given day, not global parameters, so categories are not my best option.
Let me know if that makes sense.
FYI, this functionality is available if you check under WordPress > Pages, but it does not seem to be available in the Portfolio custom type.
October 14, 2014 at 8:13 am #335412Hey!
Thank you for the update.
You can only use hierarchical parameter for pages though it is possible to enable it on custom post types, I’m not entirely sure of the ramifications of doing so. Add this on functions.php:
add_filter('avf_portfolio_cpt_args', 'avf_portfolio_add_cpt_args', 1); function avf_portfolio_add_cpt_args($args) { $args['hierarchical'] = true; $args['supports'] = array('title','thumbnail','excerpt','editor','comments', 'page-attributes'); return $args; }
Cheers!
IsmaelOctober 14, 2014 at 4:27 pm #335630Thank you for the code.
It seems to work on the backend and the frontend appears to display (as expected) but the permalink to the page does not seem to work. It throws a 404 error when clicked. My best guess is that some routing needs to be setup for the new logic?
Thanks.
October 18, 2014 at 4:30 am #337577Hi!
Try re-saving your Permalink settings, i came with that issue on my local install and that fixed it.
Cheers!
JosueOctober 18, 2014 at 6:14 am #337605Thank you. That did the trick.
-
AuthorPosts
- The topic ‘Setting up parent portfolio items’ is closed to new replies.