
-
AuthorPosts
-
July 9, 2025 at 7:47 pm #1486538
Hi : ) I need to enable parent-child hierarchy for portfolio entries. I tried using plugins like custom post type UI but they seem to be conflicting with the already existing Enfold portfolio entry hierarchy.
How do I setup the portfolio items entries, so that the entries can have the parent-child hierarchy option, the same as it is for a page to have a parent-child hierarchy with another page?
July 10, 2025 at 6:20 am #1486563Hey envisageiam,
Thank you for the inquiry.
You can use the avf_portfolio_cpt_args filter to make the portfolio post type hierarchical. You will also find the full post type registration in the enfold/includes/admin/register-portfolio.php file.
function avf_portfolio_cpt_args_mod( $args ) { $args['hierarchical'] = true; return $args; } add_filter( 'avf_portfolio_cpt_args', 'avf_portfolio_cpt_args_mod' );
The default portfolio templates don’t support this out of the box, so you may need to customize them if needed.
Best regards,
IsmaelJuly 10, 2025 at 5:13 pm #1486607Hi – Thank you for your reply.
The code has been added to the bottom of the includes/admin/register-portfolio.php file, but I am still not seeing the option on the product pages to set the parent.
I have added a user login below for your review. Thank you for your help. I’m super grateful for your time!July 11, 2025 at 6:32 am #1486627Hi,
Thank you for the info.
We forgot to include support for page-attributes. The login account doesn’t have administrator rights, so we were not able access the theme file editor. Please try this again:
add_action('init', function() { function avf_portfolio_cpt_args_mod( $args ) { $args['hierarchical'] = true; $args['supports'][] = 'page-attributes'; return $args; } add_filter( 'avf_portfolio_cpt_args', 'avf_portfolio_cpt_args_mod' ); });
You should see this after adding the filter:
Best regards,
IsmaelJuly 11, 2025 at 11:20 am #1486646The file has been updated but im still not seeing the option to set a parent portfolio entry/page.
I have updated the credentials to admin for your review : ) -
AuthorPosts
- You must be logged in to reply to this topic.