Martin Malley
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Themes and Templates
In reply to: "Add New" for a post typeSo I found the register code in theme-init.php. But there is no mention of setting up the add new in any of the CPT listed there.
function my_post_type_portfolio() { register_post_type( 'portfolio', array( 'label' => __('Portfolio'), 'singular_label' => __('Porfolio Item', 'theme1471'), '_builtin' => false, 'public' => true, 'show_ui' => true, 'show_in_nav_menus' => true, 'hierarchical' => true, 'capability_type' => 'page', 'menu_icon' => get_template_directory_uri() . '/includes/images/icon_portfolio.png', 'rewrite' => array( 'slug' => 'portfolio-view', 'with_front' => FALSE, ), 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt', 'custom-fields', 'comments') ) ); register_taxonomy('portfolio_category', 'portfolio', array('hierarchical' => true, 'label' => 'Portfolio Categories', 'singular_name' => 'Category', "rewrite" => true, "query_var" => true)); } add_action('init', 'my_post_type_portfolio');
I tried adding:
'add_new' => __( 'Add New', 'portfolio'), 'add_new_item' => __( 'Add New' ), 'new_item' => __( 'New'),
But no joy. What am I missing?
Forum: Themes and Templates
In reply to: "Add New" for a post typeFirst thing was to dig in the functions.php. I did a search of all the files in the theme folder and cannot find the word portfolio in any function type file. Also looked in the tables and found some things, but it was not obvious how they worked.
Is the Portfolio post_type standard in wordpress? I working on the assumption that the theme developer would have had to add it.
Viewing 2 replies - 1 through 2 (of 2 total)