WordPress.org

Ready to get started?Download WordPress

Forums

Please Help With Custom Post Types and Displaying them (2 posts)

  1. Adam
    Member
    Posted 2 years ago #

    So I am having this issue where I have created this custom post type as see here. Those are three of the custom post types I created.

    The one I want to focus on is the ae or Aritcles and Essays.

    So now that I have a custom post type I have created a single-ae.php file with the following loop structure.

    So now when I create posts for that post type I should see them.

    My undertanding is the url will be something like:

    http://localhost/wordpress/ae/post-name

    since I have set my perma links to /%category%/%postname%

    How ever viewing the posts gives me a 404 and not my themes 404 but a server 404. (I thought my 404 was broken so I went and tested my search on my theme and nope my 404 works...)

    if I have my perma links set to: http://localhost/wordpress/?p=123 which is default I see the post at: http://localhost/wordpress/?ae=post-name how ever its just an empty post - yes there is content in that post

    so whats going on? how do I fix it?

  2. Cris Henderson
    Member
    Posted 2 years ago #

    Try making your rewrite :
    'rewrite' => array('slug' => 'ae'),

Topic Closed

This topic has been closed to new replies.

About this Topic