Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #224930

    Hi,
    I’ve been following your advice about displaying entries from a custom taxonomy with a blog element.
    (for example : https://kriesi.at/support/topic/how-to-create-index-page-for-custom-post-types/)
    Note : Everything is correct in my new CPT pages : they’re well displayed with the whole and complete Avia editor, and well displayed in the front end.

    When I’m choosing the post tag or the category of my new custom post types (there’re 2 of them), nothing is displayed. My custom post type contain both tags and category
    → I encounter a message ‘Nothing found

    What should I do ? What’s missing ?
    Thanks for your kindfull help

    Ikyo

    #225415

    Hi Ikyo!

    Please create me an admin account and post the login credentials as private reply – I’ll check the setup.

    Regards,
    Peter

    #225435
    This reply has been marked as private.
    #226309

    Hey!

    Did you also create the taxonomy for your CPT and attach it to the post type creation function?

    Cheers!
    Devin

    #226375

    Hi Devin

    I will double check my taxonomy for my CPT..thanks for the hint !
    Whatever, the result should appear if I select the new category i’ve just build (in the back office) for portfolio

    #226394

    Devin…
    Here’s my CPT declaration in function.php of my child theme

    Many thanks for your help

    // CPT Exposition
    	
    	$labels = array( 
            'name' => _x( 'Exposition', 'exposition' ),
            'singular_name' => _x( 'Exposition', 'exposition' ),
            'add_new' => _x( 'Ajouter', 'exposition' ),
            'add_new_item' => _x( 'Ajouter une nouvelle exposition', 'exposition' ),
            'edit_item' => _x( 'Editer exposition', 'exposition' ),
            'new_item' => _x( 'Nouvelle exposition', 'exposition' ),
            'view_item' => _x( 'Afficher une exposition', 'exposition' ),
            'search_items' => _x( 'Rechercher les exposition', 'exposition' ),
            'not_found' => _x( 'Aucune exposition trouvée', 'exposition' ),
            'not_found_in_trash' => _x( 'Aucune exposition trouvée dans la corbeille', 'exposition' ),
            'parent_item_colon' => _x( 'exposition parent', 'exposition' ),
            'menu_name' => _x( 'Exposition', 'exposition' ),
        );
    
        $args = array( 
            'labels' => $labels,
            'hierarchical' => true,
            'description' => 'Exposition féline',
            'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes' ),
            'taxonomies' => array( 'category', 'post_tag', 'page-category', 'Portfolio Categories  ' ),
            'public' => true,
            'show_ui' => true,
            'show_in_menu' => true,
            
            'menu_icon' => get_bloginfo('stylesheet_directory') . '/image/exposition-fff.png',
            'show_in_nav_menus' => true,
            'publicly_queryable' => true,
            'exclude_from_search' => false,
            'has_archive' => true,
            'query_var' => true,
            'can_export' => true,
            'rewrite' => true,
            'capability_type' => 'post'
        );
    	
    	register_taxonomy("Exposition",
    		array("Exposition"),
    		array(	"hierarchical" => true,
    		"label" => __('Expositions'),
    		"singular_label" => __('Exposition'),
    		"rewrite" => true,
    		"query_var" => true
    	));
    
        register_post_type( 'exposition', $args );
    • This reply was modified 10 years, 10 months ago by Ikyo.
    #226399

    Hi Devin

    Thanks to you, I’ve change the CPT code (I use another generator :

    It does work now :)
    THANKS
    THANKS
    Thanks to you to Dude also
    What a good team :)

    But I don’t understand why it does not work with a category create in the backoffice

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Custom post type in an index’ is closed to new replies.