Support » Plugin: Custom Post Type UI » [Plugin: Custom Post Type UI] Categories and lists

  • Resolved baszer

    (@baszer)


    Hello,

    I want to display all my custom post types in the menu. When I did this no one was listed. I had to add the following code to my function.php

    //To make category archives display all posts, regardless of post type
    	function any_ptype_on_cat($request) {
    	if ( isset($request['category_name']) )
    		$request['post_type'] = 'any';
    
    	return $request;
    	}
    	add_filter('request', 'any_ptype_on_cat');

    Now the custom post type was listed. I now created a category-customposttype.php and got them listed. But only the first ten are listed. I want to add the following line of code <?php query_posts( 'posts_per_page=-1' ); ?> and nothing is listed anymore. I think it is because WP doesnt see them as the same content. But how can I make it so that I can list them on my way?

    http://wordpress.org/extend/plugins/custom-post-type-ui/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Ov3rfly

    (@ov3rfly)

    You should get more entries by increasing the “… show at most” number in “WordPress Settings Reading Screen”

    http://codex.wordpress.org/Settings_Reading_Screen

    baszer

    (@baszer)

    yes I know that, but I only want to change the amount of posts on this template. Not on my other pages.

    Ov3rfly

    (@ov3rfly)

    Can you post the relevant code from your category-customposttype.php?

    baszer

    (@baszer)

    baszer

    (@baszer)

    @over3fly, i got it working now! Deleted the

    //To make category archives display all posts, regardless of post type
    	function any_ptype_on_cat($request) {
    	if ( isset($request['category_name']) )
    		$request['post_type'] = 'any';
    
    	return $request;
    	}
    	add_filter('request', 'any_ptype_on_cat');

    and added query_posts( 'post_type=correct_type'); Thanks for answering me!

    Ov3rfly

    (@ov3rfly)

    Ok. No problem…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Custom Post Type UI] Categories and lists’ is closed to new replies.