Solved

Can't get Custom Post Type to display after select with Drop Down List

Posted on 2010-08-24
2
300 Views
Last Modified: 2012-05-10
I have created a custom post type, and it works ok.  I can go to the edit screen and click on 'View' and it properly uses the correct template to show the single custom post type.

I then have a page with the following code:
<form action="<?php bloginfo('url'); ?>" method="get">
        <div>
		<?php wp_dropdown_categories(array('taxonomy' => 'Membership Category')); ?>
        <input type="submit" name="submit" value ="view" />
        </div>
        </form>

Open in new window


When you select a term from the drop down list, I get a Error 404 page not found.  This is the link that it is trying to show:
webste/wp-development/?cat=16&submit=view

It seems like the permalinks/redirect is not working properly.

In my custom post type setup, I have this:
function memberlist_register() {
 
	$labels = array(
		'name' => _x('Member List', 'post type general name'),
		'singular_name' => _x('Member List', 'post type singular name'),
		'add_new' => _x('Add New', 'member list'),
		'add_new_item' => __('Add New Member'),
		'edit_item' => __('Edit Memeber'),
		'new_item' => __('New Member'),
		'view_item' => __('View Member'),
		'search_items' => __('Search Member'),
		'not_found' =>  __('Nothing found'),
		'not_found_in_trash' => __('Nothing found in Trash'),
		'parent_item_colon' => ''
	);
 
	$args = array(
		'labels' => $labels,
		'public' => true,
		'publicly_queryable' => true,
		'show_ui' => true,
		'_builtin' => false,
		'query_var' => true,
		'menu_icon' => get_stylesheet_directory_uri() . '/article16.png',
		'capability_type' => 'post',
		'hierarchical' => true,
		'rewrite' => array ('slug' => 'memberlists'),
		'menu_position' => null,
		'supports' => array('title','thumbnail')
	  ); 
 
	register_post_type( 'memberlist' , $args );
}

Open in new window


I have went to the permalinks in setup and re-saved everything to flush the permalinks.

0
Comment
Question by:keith1001
2 Comments
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 33528524
I know this is kind of a "hack fix", but have you attempted to download simple 301 redirects plugin: http://wordpress.org/extend/plugins/simple-301-redirects/

Then in the 301 redirect settings you would put:
webste/wp-development/?cat=16&submit=view

And in the second URL box of the 301 Redirect Settings page you would put:
webste/wp-development/"whatever the category is you are tying to link to"

Let me know  if this helps.
0
 

Accepted Solution

by:
keith1001 earned 0 total points
ID: 33557265
What I had to end up doing was create my own function for the drop down list.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Who says nothing in life is free? WordPress.com is a freebie. WordPress.org's downloadable publishing platform is free. Heck, even WordPressMU is free. WordPress is an open source project, which means it can be used on any personal or commerc…
I want to start by talking about the use of plug-ins for WordPress. I started a web-site for a company I was working for a few years ago; I had extremely basic knowledge of HTML. I am a Graphic Designer by trade so I invited the opportunity as a cha…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now