Solved

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

Posted on 2010-08-24
2
303 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
WP_Query multiple custom taxonomies 5 59
CSS Logo Problem. 2 26
help squeezing some space out in this site 9 39
Make a website not indexable by google 6 16
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…
How to install BuddyPress on your self-hosted WordPress site It’s been called everything from “social networking in a box” to “Facebook without the terms of service,” but until Feb. 16, BuddyPress was a relatively unknown outside the WordPress MU…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…

829 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