Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Mickey Kay

    (@mcguive7)

    Hmmm, good catch. Right now the plugin is only set to display “public” post types, and to ignore “built-in” post types (e.g. media). Can you tell me what plugins you are using to generate the “Exposiciones” and “Eventos” post types, so that i can determine why they are not showing?

    Have you tried switching them to “public”, as this should fix the issue?

    Thread Starter rotarypot

    (@rotarypot)

    I’m not using a plugin to generate my custom post types, i’ve added functions to make them.
    this is my code

    function eventos() {
    	// creating (registering) the custom type
    	register_post_type( 'eventos', /* (https://codex.www.ads-software.com/Function_Reference/register_post_type) */
    	 	// let's now add all the options for this post type
    		array('labels' => array(
    			'name' => __('Eventos', 'jointstheme'), /* This is the Title of the Group */
    			'singular_name' => __('Evento', 'jointstheme'), /* This is the individual type */
    			'all_items' => __('Todos los Eventos', 'jointstheme'), /* the all items menu item */
    			'add_new' => __('Crear nuevo Evento', 'jointstheme'), /* The add new menu item */
    			'add_new_item' => __('Crear un nuevo evento', 'jointstheme'), /* Add New Display Title */
    			'edit' => __( 'Editar este Evento', 'jointstheme' ), /* Edit Dialog */
    			'edit_item' => __('Editar este evento', 'jointstheme'), /* Edit Display Title */
    			'new_item' => __('Nuevo Evento', 'jointstheme'), /* New Display Title */
    			'view_item' => __('Ver este Evento', 'jointstheme'), /* View Display Title */
    			'search_items' => __('Buscar Evento', 'jointstheme'), /* Search Custom Type Title */
    			'not_found' =>  __('Nothing found in the Database.', 'jointstheme'), /* This displays if there are no entries yet */
    			'not_found_in_trash' => __('Nothing found in Trash', 'jointstheme'), /* This displays if there is nothing in the trash */
    			'parent_item_colon' => ''
    			), /* end of arrays */
    			'description' => __( 'Esta es una publicacion de tipo Eventos', 'jointstheme' ), /* Custom Type Description */
    			'public' => true,
    			'publicly_queryable' => true,
    			'exclude_from_search' => false,
    			'show_ui' => true,
    			'query_var' => true,
    			'menu_position' => 12, /* this is what order you want it to appear in on the left hand side menu */
    			'menu_icon' => get_stylesheet_directory_uri() . '/library/images/custom-post-icon.png', /* the icon for the custom post type menu */
    			'rewrite'	=> array( 'slug' => 'eventos', 'with_front' => false ), /* you can specify its url slug */
    			'has_archive' => 'eventos', /* you can rename the slug here */
    			'capability_type' => 'post',
    			'hierarchical' => false,
    			/* the next one is important, it tells what's enabled in the post editor */
    			'supports' => array( 'title',
    								 'editor',
    								 'author',
    								 'thumbnail',
    								 'excerpt',
    								 'trackbacks',
    								 'custom-fields',
    								 'comments',
    								 'revisions',
    								 'sticky')
    			) /* end of options */
    	); /* end of register post type */
    
    	/* this adds your post categories to your custom post type */
    	//register_taxonomy_for_object_type('category', 'custom_type');
    	/* this adds your post tags to your custom post type */
    	//register_taxonomy_for_object_type('post_tag', 'custom_type');
    
    } 
    
    	// adding the function to the WordPress init
    	add_action( 'init', 'eventos');

    as you can see, the type is set to “public” ??

    Thread Starter rotarypot

    (@rotarypot)

    i’ve noticed that the custom post type that was defined last in the functions file is the only one being printed, in my case, “publicaciones”

    if its any help, this is the html being rendered.,
    https://note.io/1GJFauB

    Thanks for your fast response ??

    Were you able to figure this out? I’m having the same problem. I’m using Custom Post Type UI to create the CPTs.

    Thread Starter rotarypot

    (@rotarypot)

    actually “it fixed itself”,
    i know, this is not the answer you’re looking for.. sorry.

    what i mean, is that suddenly it worked.
    if its of any help, this is my final file so you can maybe use it for comparison.

    https://pastie.org/10189395

    good luck ??

    Thanks for the response and the code! I appreciate it. ??

    Plugin Author Mickey Kay

    (@mcguive7)

    Hey you two,

    I just wanted to follow up on this one, as I discovered and fix a minor bug that may solve this problem. I just released version 1.0.1, and I’d love to know if it fixes your problem. Thanks!

    – Mickey

    Plugin Author Mickey Kay

    (@mcguive7)

    Marking this as resolved unless I hear otherwise.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘only one custom post type is showing up’ is closed to new replies.