Skip to content

Instantly share code, notes, and snippets.

@pietromalerba
Last active December 14, 2015 19:09
Show Gist options
  • Save pietromalerba/5134802 to your computer and use it in GitHub Desktop.
Save pietromalerba/5134802 to your computer and use it in GitHub Desktop.
Seo Custom Post Type
<?php
/*
Plugin Name: Seo Custom Post Type
Version: 1.0
Description: Questo plugin consente di gestire le pagine SEO separatamente dalle pagine standard di wordpress in modo non confondere l'utonto
Author: Pietro Malerba
Author URI: http://www.emmealcubo.com
*/
class seo_custom_post
{
var $post_type_name = 'seotype';
var $post_type_label = 'Seo';
function __construct()
{
add_action('init', array(&$this,'register_post'));
}
function register_post()
{
register_post_type($this->post_type,
array(
'label' => $this->post_type_label,
'public' => true,
'show_ui' => true,
'hierarchical' => true,
'rewrite' => array(
'slug' => '',
'with_front' => true
),
'hierarchical' => true,
'supports' => array(
'title',
'editor',
'custom-fields'
),
)
);
}
}
new seo_custom_post();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment