Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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.

    #334850

    Hi momon!

    Please go to Portfolio Items > Portfolio Categories and add child categories to your parent categories

    Regards,
    Yigit

    #335022

    Looks 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
    -> Ants

    Etc

    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.

    #335412

    Hey!

    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!
    Ismael

    #335630

    Thank 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.

    #337577

    Hi!

    Try re-saving your Permalink settings, i came with that issue on my local install and that fixed it.

    Cheers!
    Josue

    #337605

    Thank you. That did the trick.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Setting up parent portfolio items’ is closed to new replies.