How do I safely separate a custom portfolio type that was developed inside a theme?

I am working on a website that is using the theme Nordic. I am preparing to develop a new template for this website, but I have a problem: the entire content of the site was created on a custom portfolio that is part of the active theme.

I understand that the best way to manage custom post types is by using plugins. So this is my purpose. I want to know how can I do to reuse the almost 40 projects that are already registered in the website when I will active a new plugin and a new theme. For example, I want to know if it could be easier to develop a new portfolio plugin, or if it is the same if I pick one that is already available on the wordpress repository. Specifically, I wish to know if there is something like a “naming rule” that could make easier to connect the existing projects with a “new developed” or an “existing” plugin, or if it exists a specific procedure for this kind of connections. Suppose that I will use jetpack’s portfolio: how can I make jetpack to recognize the existing projects?

In any case, Nordic’s theme is using this piece of code to define portfolios (from the folder includes/post-types.php) :

function my_post_types(){
$rewrite = array();
$rewrite[“slug”] = “portfolio”;
$rewrite[“with_front”] = true;

register_post_type( ‘portfolio’,
‘labels’ => array(
‘name’ => __( “Portfolio” ,”um_lang”),
‘singular_name’ => __( “Portfolios” , “um_lang” )
‘public’ => true,
‘supports’ => array(‘title’,’editor’,’thumbnail’,’comments’,’author’),
‘rewrite’ => $rewrite

register_post_type( ‘contact_form’,
‘labels’ => array(
‘name’ => __( “Contact Forms” ,”um_lang”),
‘singular_name’ => __( “Contact Form” , “um_lang” )
‘public’ => true,
‘supports’ => array(‘title’)

register_taxonomy(‘portfolio_category’,array (
0 => ‘portfolio’,
),array( ‘hierarchical’ => true, ‘label’ => ‘Portfolio Category’,’show_ui’ => true,’query_var’ => true,’singular_label’ => ‘Portfolio Category’) );


I appreciate all your comments,

Regards !

Read more here:: How do I safely separate a custom portfolio type that was developed inside a theme?

Leave a Reply

Your email address will not be published. Required fields are marked *