Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

i created a custom_post_type:

 add_action('init', 'event_register');

function event_register() {

$labels = array(
  'name' => _x('Pacotes', 'post type general name'),
  'singular_name' => _x('pacote', 'post type singular name'),
  'add_new' => _x('adicionar', 'pacote'),
  'add_new_item' => __('Adicionar novo Pacote'),
  'edit_item' => __('Editar Pacote'),
  'new_item' => __('Novo Pacote'),
  'view_item' => __('Ver Pacote'),
  'search_items' => __('Procurar Pacote'),
  'not_found' =>  __('Não encontrado'),
  'not_found_in_trash' => __('Nada encontrado no lixo'),
  'parent_item_colon' => ''
);

$args = array(
  'labels' => $labels,
  'public' => true,
  'publicly_queryable' => true,
  'show_ui' => true,
  'query_var' => true,
  'rewrite' => true,
  'capability_type' => 'post',
  'hierarchical' => false,
  'menu_position' => 5,
  'supports' => array('title','editor','thumbnail')
);

register_post_type( 'pacotes' , $args );
}

when i create post it does not appear in the page. is there any code that calls for the posts?

thank you.

share|improve this question
    
It doesn't appear on what page? The blog page? –  jfacemyer Feb 27 '13 at 14:41
1  
Would be nice if you read my answer and let me know if it works for you. –  DigitalSea Feb 28 '13 at 10:47

1 Answer 1

The likely issue here is you need to refresh your permalinks for it to recognise the post type. Classic fix is to go to Settings > Permalinks and then click Save Changes without actually saving anything. Just loading the permalinks setting page usually fixes it, but saving makes sure.

I'd say that'll fix the issue.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.