Hot To Add " Page attributes " (Model Page) to Portfolio ITEM and Blog Post

Hello

I would be able to add this :

To Portfolio Items & Blog post

Is it possible ?

Regards

Hi @kosmoss,

Thanks for reaching out.

It’s not recommended since post and porftolio has its own set of templates integrated to is specific features, like post format and so on. Doing that may cause issues but if you insist, you can add this code to your child theme’s functions.php

    function x_add_page_templates() {
        add_post_type_support( 'post', 'page-attributes' );
        add_post_type_support( 'x-portfolio', 'page-attributes' );
    }

    add_action( 'init', 'x_add_page_templates' );

This may or may not work, based on https://codex.wordpress.org/Function_Reference/add_post_type_support, it’s only available for page type. And we can’t provide further support for future issues caused by this changes.

Thanks!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.