• I’ve been creating a custom post type and I’ve got it working well. The final piece of the jigsaw is to use Greg’s High Performance SEO plug in with the custom post type as I do on standard posts. The problem is that I can’t figure out how to add the input boxes to the editor page. In my functions.php file I’ve tried:
    'supports' => array('title', 'editor', 'custom-fields'),
    and:
    'supports' => array('title', 'editor', 'ghpseo'),
    but neither of them give me what I need.

    For reference, here is my complete function from functions.php:

    add_action( 'init', 'create_post_type' );
    function create_post_type() {
    	register_post_type( 'article', array(
    		'label' => ( 'Articles' ),
    		'singular_label' => ( 'Article' ),
    		'public' => true,
    		'show_ui' => true,
    		'_builtin' => false,
    		'capability_type' => 'post',
    		'hierarchical' => false,
    		'rewrite' => false,
    		'query_var' => false,
    		'supports' => array('title', 'editor'),
    		'rewrite' => array("slug" => "article"),
    		'menu_position' => 5,
    		'has_archive' => 'articles',
    		'taxonomies' => array('category', 'post_tag') // this is IMPORTANT for adding the input boxes
    	));
        register_taxonomy_for_object_type('category', 'article');
        register_taxonomy_for_object_type('post_tag', 'article');
    }

    I’m guessing I’m barking up the wrong tree altogether so any pointers would be a great help.
    Thanks,
    James

Viewing 1 replies (of 1 total)
  • The only way I have found to register the Greg’s SEO meta box with a custom post type is to edit the plugin itself. I hate doing this but at the moment there is no interface for it.

    FIND:
    gregs-high-performance-seo/ghpseo-writing-functions.php

    if ($this->post_set)
    add_meta_box("{$prefix}-meta", $name, array(&$this,'meta_writing_post'), 'post', 'normal', 'high');

    ADD THIS LINE FOR EACH CUSTOM TYPE:

    add_meta_box("{$prefix}-meta", $name, array(&$this,'meta_writing_post'), 'article', 'normal', 'high');

    (Just replace ‘post’ with the registered name of your CPT)

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Greg's High Performance SEO] Using with custom post type’ is closed to new replies.