Last active
December 14, 2015 19:09
-
-
Save pietromalerba/5134802 to your computer and use it in GitHub Desktop.
Seo Custom Post Type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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