WordPress.org

Ready to get started?Download WordPress

Forums

Custom post type Feeds don't work (2 posts)

  1. ElaineMarley86
    Member
    Posted 2 years ago #

    I try to see the feeds for a custom post type (news) at this adress

    /?feed=atom&?post_type=news

    but strangely the feed shows the standard 'post' archive and not the 'news' post_type archive. I can't understand why. This happens for all the feed types (atom, rss and rss2).
    Here's the code for the setup of the post type, maybe I've done some mistake writing it.

    register_post_type( 'news',
    		array(
    'labels' => array(
    	'name' => __( 'News' ),
    	'singular_name' => __( 'News' ),
    	'add_new' => __( 'Inserisci nuova' ),
    	'add_new_item' => __( 'Inserisci nuova news' ),
    	'search_items' => __( 'Cerca news' ),
    	'not_found' => __( 'Nessuna news trovata.' ),
    ),
    'public' => true,
    'menu_position' => 6,
    'map_meta_cap' => true,
    'supports' => array('title','editor','thumbnail'),
    'taxonomies' => array('post_tag'),
    'capability_type' => 'news',
    'has_archive' => true,
    'capabilities' => array(
    [...cut...]
    ),
    		)
    	);
  2. ElaineMarley86
    Member
    Posted 2 years ago #

    I added 'publicly_queryable' => true, even if I knew it's inherithed from public, and obviously nothing changed.
    I deactivated the only other part plugin I installed (members plugin), I turned off every other function I put in functions.php but, again, nothing changed :(
    If someone has any idea what the problem could be...

Topic Closed

This topic has been closed to new replies.

About this Topic